POC-golang-postgres-docker/docker-compose.yml

33 lines
679 B
YAML

version: "3"
services:
db:
image: postgres
env_file: ./configs/db.env
volumes:
- db_postgres:/var/lib/postgresql/data
- ./scripts/db/ddl_01.sql:/docker-entrypoint-initdb.d/10_schema.sql
- ./scripts/db/dml_01.sql:/docker-entrypoint-initdb.d/20_insert.sql
expose:
- "5432"
restart: always
networks:
- genity_network
web:
build:
context: .
dockerfile: build/Dockerfile
env_file: ./configs/web.env
ports:
- "5000:5000"
restart: always
depends_on:
- db
links:
- db
networks:
- genity_network
volumes:
db_postgres:
networks:
genity_network:
driver: bridge