FROM postgres:9.5.23
ADD ./sqls/init.sql /docker-entrypoint-initdb.d/
version: '3'
services:
db:
build: .
ports:
- "5432:5432"
environment:
- POSTGRES_DB=my_db
- POSTGRES_USER=my_user
- POSTGRES_PASSWORD=my_password
volumes:
- postgres-data:/var/lib/postgresql/data
volumes:
postgres-data: