mirror of
https://github.com/iritmaximus/timetrials.git
synced 2026-10-12 19:13:48 +03:00
39 lines
891 B
YAML
39 lines
891 B
YAML
services:
|
|
flask:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
# command: sh -c "gunicorn -w 4 flaskr:app -b 0.0.0.0:5000 --access-logfile '-' --error-logfile '-'"
|
|
# command: sh -c "ls"
|
|
ports:
|
|
- "5000:5000"
|
|
volumes:
|
|
- .:/app
|
|
env_file: .env
|
|
environment:
|
|
- POSTGRES_DB
|
|
- POSTGRES_PORT
|
|
- POSTGRES_HOST
|
|
- POSTGRES_USER
|
|
- POSTGRES_PASSWORD
|
|
# extra_hosts:
|
|
# - "host.docker.internal:host-gateway"
|
|
depends_on:
|
|
- db
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
volumes:
|
|
- ./data/:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_DB=timetrials-db
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_HOST=db
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
healthcheck:
|
|
test: pg_isready -U postgres -d timetrials-db
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|