Files
sloppyware/docker-compose.yml
T

47 lines
1.0 KiB
YAML

version: "3.9"
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: chronos
POSTGRES_PASSWORD: chronos
POSTGRES_DB: chronos
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U chronos"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--save", "", "--appendonly", "no"]
volumes:
- redis_data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 10s
timeout: 5s
retries: 5
chronos-api:
build: ./backend
restart: unless-stopped
environment:
DATABASE_URL: postgres://chronos:chronos@postgres:5432/chronos?sslmode=disable
REDIS_URL: redis://redis:6379
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
postgres_data:
redis_data: