Use database password in Docker Compose environment

Addresses docker-library/postgres#681.
This commit is contained in:
Andrew Kvalheim 2020-03-14 16:24:49 -07:00
parent e6f3aa559e
commit 38b6486550
3 changed files with 3 additions and 1 deletions

View file

@ -37,7 +37,7 @@ There is a rudimentary docker-compose configuration for production usage (`docke
1. Configure OSEM 1. Configure OSEM
You have at least to set `SECRET_KEY_BASE` You have at least to set `OSEM_DB_PASSWORD` and `SECRET_KEY_BASE`
``` ```
cp dotenv.example .env.production cp dotenv.example .env.production
vim .env.production vim .env.production

View file

@ -5,6 +5,7 @@ services:
image: postgres image: postgres
environment: environment:
PGDATA: /var/lib/postgresql/data/pgdata PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_PASSWORD: $OSEM_DB_PASSWORD
osem: osem:
build: build:
context: . context: .

View file

@ -5,6 +5,7 @@ services:
image: postgres image: postgres
environment: environment:
PGDATA: /var/lib/postgresql/data/pgdata PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_PASSWORD: $OSEM_DB_PASSWORD
volumes: volumes:
- osem_production_database:/var/lib/postgresql/data/pgdata - osem_production_database:/var/lib/postgresql/data/pgdata
production_web: production_web: