From bc4f1023f9bfefcd9768693fda0b57d665cd481b Mon Sep 17 00:00:00 2001 From: michsarg <54892414+michsarg@users.noreply.github.com> Date: Wed, 1 Dec 2021 14:43:01 +0800 Subject: [PATCH] Fix to no password error on database run Environmental variables in docker-compose.yml needed to be duplicated from service:web to also service:db to fix password error --- samples/django.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/django.md b/samples/django.md index affb33805c..811e907a57 100644 --- a/samples/django.md +++ b/samples/django.md @@ -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