101 lines
2.7 KiB
YAML
101 lines
2.7 KiB
YAML
services:
|
|
postgres:
|
|
image: docker.io/postgres:18-alpine
|
|
container_name: cms-db
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
volumes:
|
|
- ./data/postgres:/var/lib/postgresql/data
|
|
ports:
|
|
- 5432:5432
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: docker.io/redis:8-alpine
|
|
container_name: cms-redis
|
|
volumes:
|
|
- ./data/redis:/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
meilisearch:
|
|
image: getmeili/meilisearch:v1.34.3
|
|
container_name: cms-search
|
|
environment:
|
|
- MEILI_MASTER_KEY=meilisearch
|
|
volumes:
|
|
- ./data/meilisearch:/meili_data
|
|
healthcheck:
|
|
test:
|
|
["CMD-SHELL", "curl -f http://localhost:7700/health || exit 1"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
|
|
lgtm:
|
|
image: grafana/otel-lgtm:latest
|
|
container_name: lgtm-stack
|
|
ports:
|
|
- "3000:3000"
|
|
- "4317:4317" # OTLP gRPC
|
|
- "4318:4318" # OTLP HTTP
|
|
volumes:
|
|
- ./data/lgtm:/data
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"curl -f http://localhost:3000/api/health || exit 1",
|
|
]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
caddy:
|
|
image: docker.io/caddy:latest
|
|
container_name: caddy-proxy
|
|
restart: always
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile
|
|
- ./data/caddy/data:/data
|
|
- ./data/caddy/config:/config
|
|
depends_on:
|
|
- backend
|
|
- client-cms
|
|
|
|
client-cms:
|
|
image: registry.asnk.io/nixcn-cms/client-cms:dev
|
|
container_name: cms-client
|
|
restart: always
|
|
depends_on:
|
|
lgtm:
|
|
condition: service_healthy
|
|
|
|
backend:
|
|
image: registry.asnk.io/nixcn-cms/backend:dev
|
|
container_name: cms-backend
|
|
restart: always
|
|
volumes:
|
|
- ./config.yaml:/app/config.yaml:ro
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
meilisearch:
|
|
condition: service_healthy
|
|
lgtm:
|
|
condition: service_healthy
|