All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 9m45s
38 lines
898 B
YAML
38 lines
898 B
YAML
services:
|
|
api-prod:
|
|
image: git.kanopo.dev/rhythm/rhythm-backend:latest
|
|
container_name: rhythm-api-prod
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6969:6969"
|
|
environment:
|
|
DATABASE_URL: postgres://${DB_USERNAME}:${DB_PASSWORD}@db-prod:${DB_PORT}/${DB_NAME}?schema=public&sslmode=disable
|
|
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: ${DB_NAME}
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
profiles:
|
|
- prod
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_NAME}"]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
volumes:
|
|
db:
|