Skip to content

Commit

Permalink
Parameterises data volumes & postgress password (opf#21)
Browse files Browse the repository at this point in the history
* parameterise opdata & pgdata

* postgres pwd var

* pwd quotes

* postgress password variable rename

Co-authored-by: RichardJActon <[email protected]>
  • Loading branch information
RichardJActon and RichardJActon authored Feb 16, 2022
1 parent 91039b2 commit a25deec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions compose/docker-compose.control.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
environment:
PGDATA: /var/lib/postgresql/data
volumes:
- "pgdata:/var/lib/postgresql/data"
- "${PGDATA:-pgdata}:/var/lib/postgresql/data"
- "./control:/control"
entrypoint: ["/control/upgrade/entrypoint.sh"]
backup:
Expand All @@ -25,8 +25,8 @@ services:
PGDATA: /var/lib/postgresql/data
OPDATA: /var/openproject/assets
volumes:
- "pgdata:/var/lib/postgresql/data"
- "opdata:/var/openproject/assets"
- "${PGDATA:-pgdata}:/var/lib/postgresql/data"
- "${OPDATA:-opdata}:/var/openproject/assets"
- "./backups:/backups"
- "./control:/control"
entrypoint: ["/control/backup/entrypoint.sh"]
Expand Down
7 changes: 4 additions & 3 deletions compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ x-op-app: &app
# set to true to enable the email receiving feature. See ./docker/cron for more options
IMAP_ENABLED: "${IMAP_ENABLED:-false}"
volumes:
- "opdata:/var/openproject/assets"
- "${OPDATA:-opdata}:/var/openproject/assets"

services:
db:
image: postgres:13
<<: *restart_policy
stop_grace_period: "3s"
volumes:
- "pgdata:/var/lib/postgresql/data"
- "${PGDATA:-pgdata}:/var/lib/postgresql/data"
environment:
POSTGRES_PASSWORD: p4ssw0rd
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-p4ssw0rd}
POSTGRES_DB: openproject
networks:
- backend
Expand Down Expand Up @@ -112,3 +112,4 @@ services:
restart: on-failure
networks:
- backend

0 comments on commit a25deec

Please sign in to comment.