Skip to content

Commit

Permalink
upgrade postgres to version 17
Browse files Browse the repository at this point in the history
  • Loading branch information
smajti1 committed Oct 1, 2024
1 parent 5f60dc1 commit 0130bd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
db:
image: library/postgres:15
image: library/postgres:17-alpine
restart: ${DOCKER_RESTART}
volumes:
- postgres:/var/lib/postgresql/data:z
Expand All @@ -15,7 +15,7 @@ services:
logging:
driver: "json-file"
options:
max-file: "5" # number of files or file count
max-file: "1" # number of files or file count
max-size: "25m" # file size

web_php:
Expand All @@ -33,7 +33,7 @@ services:
logging:
driver: "json-file"
options:
max-file: "5" # number of files or file count
max-file: "1" # number of files or file count
max-size: "25m" # file size

caddy:
Expand All @@ -54,7 +54,7 @@ services:
logging:
driver: "json-file"
options:
max-file: "5" # number of files or file count
max-file: "1" # number of files or file count
max-size: "25m" # file size

volumes:
Expand Down
6 changes: 3 additions & 3 deletions docs/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Dump database to file

DB_DATABASE and DB_USERNAME variable take from .env file

docker compose exec db pg_dump --no-owner --dbname=DB_DATABASE --username=DB_USERNAME > pgdump.sql
docker compose exec db pg_dump --no-owner --dbname=fakturomat --username=fakturomat > pg_dump_$(date +'%F').sql

upgrade postgres version in `docker-compose.yml` file

docker compose down
docker volume rm fakturomat_postgres
docker compose up --detach
docker compose exec -T db psql --dbname=DB_DATABASE --username=USERNAME < pgdump.sql
docker compose exec -T db psql --dbname=fakturomat --username=fakturomat < pgdump.sql

Download pgdump.sql from server

Expand All @@ -25,4 +25,4 @@ https://www.postgresql.org/docs/current/app-pgdump.html

### connect to db

docker compose exec postgres-db psql --password --dbname=$DB_DATABASE --username=$DB_USERNAME
docker compose exec db psql --password --dbname=fakturomat --username=fakturomat

0 comments on commit 0130bd5

Please sign in to comment.