zkt25/sk1/docker-compose.yml

28 lines
554 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: "3.8"
services:
db:
image: postgres:13
environment:
POSTGRES_DB: visitors
POSTGRES_USER: visitor_user
POSTGRES_PASSWORD: secret
volumes:
- db_data:/var/lib/postgresql/data
- ./db.sql:/docker-entrypoint-initdb.d/db.sql # ← autorun migration
web:
build: .
environment:
DB_HOST: db
DB_PORT: 5432
DB_NAME: visitors
DB_USER: visitor_user
DB_PASS: secret
ports:
- "8080:80"
depends_on:
- db
volumes:
db_data: