IP-Molchan-job_interview/docker-compose.yml

22 lines
482 B
YAML
Raw Permalink Normal View History

2025-01-29 21:28:17 +03:00
services:
database:
image: 'postgres:15'
env_file: .env
ports:
- 5432:5432
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
healthcheck:
test: pg_isready -U $${DB_USER} -d $${DB_NAME}
api_script:
build:
context: .
dockerfile: Dockerfile
env_file: .env
depends_on:
- database
restart: on-failure