74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: kthulu-postgres
|
|
ports:
|
|
- "25462:5432"
|
|
environment:
|
|
POSTGRES_DB: kthulu
|
|
POSTGRES_USER: kthulu
|
|
POSTGRES_PASSWORD: kthulu-dev
|
|
volumes:
|
|
- kthulu-pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U kthulu"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: kthulu-redis
|
|
ports:
|
|
- "26390:6379"
|
|
volumes:
|
|
- kthulu-redis:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: codebase/apps/api/Dockerfile
|
|
container_name: kthulu-api
|
|
ports:
|
|
- "3780:3780"
|
|
environment:
|
|
NODE_ENV: production
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_NAME: kthulu
|
|
DB_USER: kthulu
|
|
DB_PASSWORD: kthulu-dev
|
|
REDIS_URL: redis://redis:6379
|
|
MODEL_BOSS_URL: http://host.docker.internal:8100
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ${HOME}/.kthulu:/root/.kthulu:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:3780/health || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: codebase/apps/web/Dockerfile
|
|
container_name: kthulu-web
|
|
ports:
|
|
- "3781:80"
|
|
depends_on:
|
|
api:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
kthulu-pgdata:
|
|
kthulu-redis:
|