Answer the question
In order to leave comments, you need to log in
How to enter password for postgres via docker?
Hello! Help to understand please.
I am running django and postgresql with docker-compose.
Contents of docker-compose.yml:
version: '3'
services:
web:
build: ./t_kontakta
command: python3 manage.py runserver 0.0.0.0:8000
volumes:
- ./t_kontakta:/data
ports:
- "8000:8000"
depends_on:
- db
db:
image: postgres
restart: always
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
docker-compose run --rm db pg_dump -h db -U postgres postgres > database.sql
docker-compose run --rm db psql -h db -U postgres postgres < database.sql
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question