All checks were successful
Server Check Build (NixCN CMS) TeamCity build finished
Signed-off-by: Asai Neko <sugar@sne.moe>
84 lines
2.3 KiB
YAML
84 lines
2.3 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
|
|
|
|
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
|
|
- ./cert.crt:/etc/caddy/cert.crt
|
|
- ./cert.key:/etc/caddy/cert.key
|
|
- ./data/caddy/data:/data
|
|
- ./data/caddy/config:/config
|
|
|
|
cms-client:
|
|
image: registry.asnk.io/nixcn/cms-client:dev
|
|
container_name: cms-client
|
|
restart: always
|
|
depends_on:
|
|
lgtm:
|
|
condition: service_healthy
|
|
|
|
cms-server:
|
|
image: registry.asnk.io/nixcn/cms-server:dev
|
|
container_name: cms-server
|
|
restart: always
|
|
volumes:
|
|
- ./config.yaml:/app/config.yaml:ro
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
lgtm:
|
|
condition: service_healthy
|