EDIT: Docker does not seem to create my postgres database even though I have them defined in my .env
file.
I've used docker-compose config
, and it looks like Docker acknowledges my data:
environment:
POSTGRES_DB: animemusicsorter
POSTGRES_PASSWORD: root
POSTGRES_USER: waifuszn
But when I run docker-compose up
, I am given these errors:
postgres | 2021-07-12 22:39:01.906 UTC [35] FATAL: password authentication failed for user "waifuszn"
postgres | 2021-07-12 22:39:01.906 UTC [35] DETAIL: Role "waifuszn" does not exist.
I have tried removing volumes and removing postgres
and re-creating them but that also has not given me any results.
docker-compose.yml
version: '3.5'
services:
postgres:
container_name: postgres
image: postgres:11.6
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
volumes:
- ~/srv/docker/template-postgres/data:/var/lib/postgresql/data:rw
django:
container_name: django
build:
context: .
dockerfile: ./conf/django/Dockerfile.windows
command: python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
volumes:
- ./back:/app:rw
depends_on:
- postgres
env_file:
- .env
react:
container_name: react
build:
context: .
dockerfile: ./conf/react/Dockerfile
command: yarn run start:dev
ports:
- "4000:4000"
volumes:
- ./front/src:/app/src:rw
- ./front/public:/app/public:rw