rhythm-backend/compose.yaml
Dmitri e93a65ae9c
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 2m51s
docker compose
2026-04-24 20:27:12 +02:00

51 lines
1.2 KiB
YAML

services:
db-dev:
image: postgres:18.0-alpine
restart: unless-stopped
container_name: rhythm-db-dev
ports:
- "${DB_PORT}:5432"
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
profiles:
- dev
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_NAME}"]
interval: 5s
timeout: 3s
retries: 10
api-prod:
image: git.kanopo.dev/rhythm/rhythm-backend:latest
container_name: rhythm-api-prod
restart: unless-stopped
environment:
DB_HOST: db-prod
env_file:
- ".env"
depends_on:
db-prod:
condition: service_healthy
profiles:
- prod
db-prod:
image: postgres:18.0-alpine
restart: unless-stopped
container_name: rhythm-db-prod
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: rhythm-prod
volumes:
- ./postgres-data:/var/lib/postgresql/data
profiles:
- prod
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d rhythm-prod"]
interval: 5s
timeout: 3s
retries: 10