I\'am trying to create a simple postgreSQL container with a custum user and database.
This is my docker-compose file :
version: \'2\'
services:
db.po
Modify your docker-compose.yml file as below:
version: '2'
services:
db.postgres:
container_name: db.postgres
image: postgres:10
environment:
- POSTGRES_USER=myuser
- POSTGRES_PASSWORD=myuserpassword
- POSTGRES_DB=mydb
ports:
- '5432:5432'
volumes:
- ./pgdata:/var/lib/postgresql/data
Then drop your current data entirely and re-run docker-compose up
.