0
0
Fork 0

fix: set postgres password from secret for app container

This commit is contained in:
Moritz 2023-03-07 15:16:45 +01:00
parent 4e2fc582bc
commit bd95492d79
2 changed files with 6 additions and 1 deletions

View File

@ -12,8 +12,10 @@ services:
secrets:
- secret_key
- smtp_pwd
- db_password
environment:
- DATABASE_URL=postgres://postgres:postgres@rallly_db:5432/db
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- DATABASE=rallly_db:5432/db
- NEXT_PUBLIC_BASE_URL=${DOMAIN}
- SECRET_PASSWORD_FILE=/run/secrets/secret_key
- SUPPORT_EMAIL

View File

@ -25,5 +25,8 @@ file_env() {
file_env "SECRET_PASSWORD"
file_env "SMTP_PWD"
file_env "POSTGRES_PASSWORD"
export DATABASE_URL=postgres://postgres:$POSTGRES_PASSWORD@$DATABASE
/app/docker-start.sh