continuity/docker-compose.yml

139 lines
3.2 KiB
YAML

services:
server:
container_name: continuity-server
image: continuity:latest
restart: always
depends_on:
- db
environment:
- ENVIRONMENT=Development
- Testing:CreateAccountOnLogin=true
- DB:Host=db
- DB:Port=5432
- DB:Username=continuity
- DB:Password=continuity
- Game:Data:Path=/app/data/
- Tracing:Enabled=true
- OTLP:Tracing:Endpoint=http://otel-collector:4317
- OTLP:Logging:Endpoint=http://otel-collector:4317
- OTLP:Metrics:Endpoint=http://otel-collector:4317
- Zipkin:Endpoint=http://zipkin:9411/api/v2/spans
networks:
- continuity
ports:
- 10001:10001
volumes:
- type: bind
source: wk-data
target: /app/data
read_only: true
- type: bind
source: config
target: /app/config
read_only: true
mem_limit: 100m
db:
container_name: continuity-db
image: postgres:16.1-alpine
restart: always
environment:
- POSTGRES_USER=continuity
- POSTGRES_DB=continuity
- POSTGRES_PASSWORD=continuity
networks:
- continuity
ports:
- 5432:5432
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: [ CMD-SHELL, 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}' ]
interval: 10s
timeout: 3s
retries: 3
jaeger:
container_name: continuity-jaeger
image: jaegertracing/all-in-one:1.51.0
restart: always
depends_on:
- server
- prometheus
networks:
- continuity
expose:
- 14250
- 14268
- 14269
ports:
- 16686:16686
environment:
- COLLECTOR_OTLP_ENABLED=true
- METRICS_STORAGE_TYPE=prometheus
- PROMETHEUS_SERVER_URL=http://prometheus:9090
- PROMETHEUS_QUERY_SUPPORT_SPANMETRICS_CONNECTOR=true
- PROMETHEUS_QUERY_NORMALIZE_CALLS=true
- PROMETHEUS_QUERY_NORMALIZE_DURATION=true
zipkin:
container_name: continuity-zipkin
image: openzipkin/zipkin:2.24.3
restart: always
ports:
- 9411:9411
networks:
- continuity
prometheus:
container_name: continuity-prometheus
image: prom/prometheus:latest
restart: always
depends_on:
- server
ports:
- 9090:9090
volumes:
- prom-data:/prometheus
- ./otlp/prometheus.yml:/etc/prometheus/prometheus.yml
networks:
- continuity
otel-collector:
container_name: continuity-otel-collector
image: otel/opentelemetry-collector-contrib:0.89.0
restart: always
depends_on:
- prometheus
ports:
- 14278:14278
- 4317:4317
- 9091:9091
volumes:
- ./otlp/otel-config.yaml:/etc/otel-config.yaml
command: [ "--config=/etc/otel-config.yaml" ]
networks:
- continuity
grafana:
networks:
- continuity
image: grafana/grafana:latest
depends_on:
- prometheus
volumes:
- ./otlp/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yaml
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- 3000:3000
networks:
continuity:
volumes:
db-data:
prom-data:
server-logs: