myYouTube/compose.yml

36 lines
769 B
YAML
Raw Permalink Normal View History

services:
app:
build: .
restart: unless-stopped
env_file:
- .env
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_DB: youtube_app
POSTGRES_USER: youtube_app
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U youtube_app -d youtube_app"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data: