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
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
vim .env.production

View file

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

View file

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