Skip to content

Commit

Permalink
[FIX] PG env use the DB_ vars like intended in the container
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickBrun authored and Pierrick Brun committed Jun 28, 2022
1 parent 4496029 commit fed80f2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
8 changes: 2 additions & 6 deletions ci.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ services:
- SENTRY=True
- PGSSLMODE=require
- DB_NAME=${BUILD_NAME}
- PGDATABASE=${BUILD_NAME}
- DB_USER=${CI_PROJECT_NAME}
- PGUSER=${CI_PROJECT_NAME}
- DB_HOST=pgci.home.arpa
- PGHOST=pgci.home.arpa
- DB_HOST=TODO
labels:
- "traefik.enable=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${DOMAIN}`)"
Expand All @@ -41,4 +37,4 @@ volumes:
networks:
traefik:
external: true
version: '3.7'
version: '3.7'
5 changes: 3 additions & 2 deletions clear-ci.secrets.docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# never commit this file
# only to set secrets
# encrypt me with sops --age $KEYGENERATEDINCI --encrypt clear-ci.secrets.docker-compose.yml > ci.secrets.docker-compose.yml
# encrypt me with:
# sops --age $KEYGENERATEDINCI --encrypt clear-ci.secrets.docker-compose.yml > ci.secrets.docker-compose.yml
# The sops public key ($KEYGENERATEDINCI) can be found in ~gitlab-runner/.config/sops/age/keys.txt
>>>>>>> 079c2c9 (fixup! [FIX] PGPASSWORD -> DB_PASSWORD)
version: "3.7"
services:
odoo:
environment:
- DB_PASSWORD=
- PGPASSWORD=
- ENCRYPTION_KEY_CI=
8 changes: 5 additions & 3 deletions clear-prod.secrets.docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# never commit this file
# only to set secrets
# encrypt me with sops --age $KEYGENERATEDINCI --encrypt clear-prod.secrets.docker-compose.yml > prod.secrets.docker-compose.yml
# only used to set secrets
# encrypt me with:
# sops --age $KEYGENERATEDINPROD --encrypt clear-prod.secrets.docker-compose.yml > prod.secrets.docker-compose.yml
# The sops public key ($KEYGENERATEDINPROD) can be found in ~app/.config/sops/age/keys.txt
version: "3.7"
services:
odoo:
environment:
- DB_PASSWORD=
- PGPASSWORD=
- ENCRYPTION_KEY_CI=
- ENCRYPTION_KEY_PROD=
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
- LOCAL_USER_ID=$UID
- RUNNING_ENV=$ENV
- MARABUNTA_MODE=demo
- DB_USER=$PGUSER
- DB_HOST=$PGHOST
- DB_NAME=$PGDATABASE
- SERVER_WIDE_MODULES=web
#,queue_job,sentry?
- QUEUE_JOB_CHANNELS=
Expand All @@ -21,4 +24,4 @@ services:
labels:
docky.main.service: true
docky.user: odoo
version: '3.7'
version: '3.7'
9 changes: 2 additions & 7 deletions prod.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@ services:
environment:
- MARABUNTA_MODE=prod
- ADDONS_PATH=/odoo/links,/odoo/local-src,/odoo/src/odoo/addons,/odoo/src/addons
- ODOO_BASE_URL=TODO
- ODOO_BASE_URL=https://TODO
- SENTRY=True
- PGSSLMODE=require
- DB_NAME=TODO
- PGDATABASE=TODO
- DB_USER=TODO
- PGUSER=TODO
- DB_HOST=TODO
- PGHOST=TODO
- DB_NAME=${COMPOSE_PROJECT_NAME}
volumes:
- ~/data/${COMPOSE_PROJECT_NAME}/addons:/data/odoo/addons
- ~/data/${COMPOSE_PROJECT_NAME}/filestore:/data/odoo/filestore
Expand Down

0 comments on commit fed80f2

Please sign in to comment.