mirror of https://github.com/docker/docs.git
ADD env variables to db container
FIX Error: Database is uninitialized and superuser password is not specified. Env vars needs to be defined in both the "db" and "web" containers In "db", so it can create the default user from it In "web", so it can be used in settings.py to connect django to the postgres container
This commit is contained in:
parent
5be8884def
commit
e9d0a55d28
|
@ -75,6 +75,10 @@ and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extensi
|
|||
image: postgres
|
||||
volumes:
|
||||
- ./data/db:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_NAME=postgres
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
web:
|
||||
build: .
|
||||
command: python manage.py runserver 0.0.0.0:8000
|
||||
|
|
Loading…
Reference in New Issue