2021-09-08 00:03:12 +02:00
|
|
|
version: "3.3"
|
|
|
|
services:
|
2023-01-02 15:59:03 +01:00
|
|
|
nats:
|
2023-01-15 14:03:29 +01:00
|
|
|
image: nats
|
2023-01-02 15:59:03 +01:00
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- 4222:4222
|
|
|
|
- 8222:8222
|
2023-01-05 15:33:53 +01:00
|
|
|
|
2023-01-02 15:59:03 +01:00
|
|
|
redis:
|
|
|
|
image: redis
|
2023-01-13 19:23:19 +01:00
|
|
|
ports:
|
|
|
|
- 6379:6379
|
2023-01-15 14:03:29 +01:00
|
|
|
mock:
|
|
|
|
image: nginx
|
2022-12-31 14:07:30 +01:00
|
|
|
cache:
|
2023-01-20 18:37:17 +01:00
|
|
|
image: ghcr.io/discordnova/nova/cache:${TAG:-latest}
|
2023-01-02 15:59:03 +01:00
|
|
|
restart: always
|
2022-12-31 14:07:30 +01:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
args:
|
|
|
|
- COMPONENT=cache
|
2023-01-02 15:59:03 +01:00
|
|
|
volumes:
|
2023-01-05 15:33:53 +01:00
|
|
|
- ./config/default.yml:/config/default.yml
|
2023-01-02 15:59:03 +01:00
|
|
|
environment:
|
2023-01-05 15:33:53 +01:00
|
|
|
- RUST_LOG=debug
|
2023-01-02 15:59:03 +01:00
|
|
|
depends_on:
|
|
|
|
- nats
|
|
|
|
- redis
|
2023-01-05 15:33:53 +01:00
|
|
|
- otelcol
|
2023-01-02 15:59:03 +01:00
|
|
|
|
2022-12-31 14:43:42 +01:00
|
|
|
gateway:
|
2023-01-20 18:37:17 +01:00
|
|
|
image: ghcr.io/discordnova/nova/gateway:${TAG:-latest}
|
2023-01-02 15:59:03 +01:00
|
|
|
restart: always
|
2022-12-31 14:43:42 +01:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
args:
|
|
|
|
- COMPONENT=gateway
|
2023-01-02 15:59:03 +01:00
|
|
|
volumes:
|
2023-01-05 15:33:53 +01:00
|
|
|
- ./config/default.yml:/config/default.yml
|
2023-01-02 15:59:03 +01:00
|
|
|
environment:
|
2023-01-05 15:33:53 +01:00
|
|
|
- RUST_LOG=debug
|
2023-01-02 15:59:03 +01:00
|
|
|
depends_on:
|
|
|
|
- nats
|
2023-01-05 15:33:53 +01:00
|
|
|
- otelcol
|
2023-01-02 15:59:03 +01:00
|
|
|
|
2022-12-31 14:43:42 +01:00
|
|
|
rest:
|
2023-01-20 18:37:17 +01:00
|
|
|
image: ghcr.io/discordnova/nova/rest:${TAG:-latest}
|
2023-01-02 15:59:03 +01:00
|
|
|
restart: always
|
2022-12-31 14:43:42 +01:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
args:
|
|
|
|
- COMPONENT=rest
|
2023-01-02 15:59:03 +01:00
|
|
|
volumes:
|
2023-01-05 15:33:53 +01:00
|
|
|
- ./config/default.yml:/config/default.yml
|
2023-01-02 15:59:03 +01:00
|
|
|
environment:
|
2023-01-05 15:33:53 +01:00
|
|
|
- RUST_LOG=debug
|
2023-01-02 15:59:03 +01:00
|
|
|
depends_on:
|
|
|
|
- ratelimit
|
2023-01-05 15:33:53 +01:00
|
|
|
- otelcol
|
2023-01-02 15:59:03 +01:00
|
|
|
ports:
|
|
|
|
- 9001:9000
|
2023-01-05 15:33:53 +01:00
|
|
|
- 8090:8090
|
2023-01-02 15:59:03 +01:00
|
|
|
|
2022-12-31 14:43:42 +01:00
|
|
|
webhook:
|
2023-01-20 18:37:17 +01:00
|
|
|
image: ghcr.io/discordnova/nova/webhook:${TAG:-latest}
|
2023-01-02 15:59:03 +01:00
|
|
|
restart: always
|
2022-12-31 14:43:42 +01:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
args:
|
|
|
|
- COMPONENT=webhook
|
2023-01-02 15:59:03 +01:00
|
|
|
volumes:
|
2023-01-05 15:33:53 +01:00
|
|
|
- ./config/default.yml:/config/default.yml
|
2023-01-02 15:59:03 +01:00
|
|
|
environment:
|
2023-01-05 15:33:53 +01:00
|
|
|
- RUST_LOG=debug
|
2023-01-02 15:59:03 +01:00
|
|
|
depends_on:
|
|
|
|
- nats
|
2023-01-05 15:33:53 +01:00
|
|
|
- otelcol
|
2023-01-02 15:59:03 +01:00
|
|
|
ports:
|
|
|
|
- 9002:9000
|
2023-01-05 15:33:53 +01:00
|
|
|
- 8091:8091
|
2023-01-02 15:59:03 +01:00
|
|
|
ratelimit:
|
2023-01-20 18:37:17 +01:00
|
|
|
image: ghcr.io/discordnova/nova/ratelimit:${TAG:-latest}
|
2023-01-02 15:59:03 +01:00
|
|
|
restart: always
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
args:
|
|
|
|
- COMPONENT=ratelimit
|
|
|
|
volumes:
|
2023-01-05 15:33:53 +01:00
|
|
|
- ./config/default.yml:/config/default.yml
|
2023-01-02 15:59:03 +01:00
|
|
|
environment:
|
2023-01-05 15:33:53 +01:00
|
|
|
- RUST_LOG=debug
|
2023-01-02 15:59:03 +01:00
|
|
|
depends_on:
|
|
|
|
- nats
|
|
|
|
- redis
|
2023-01-05 15:33:53 +01:00
|
|
|
- otelcol
|
|
|
|
|
|
|
|
# ********************
|
|
|
|
# Telemetry Components
|
|
|
|
# ********************
|
|
|
|
# Jaeger
|
|
|
|
jaeger:
|
|
|
|
image: jaegertracing/all-in-one
|
|
|
|
container_name: jaeger
|
|
|
|
command:
|
|
|
|
- "--query.base-path"
|
|
|
|
- "/jaeger/ui"
|
|
|
|
- "--prometheus.server-url"
|
|
|
|
- "http://${PROMETHEUS_ADDR}"
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 275M
|
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- "4317" # OTLP gRPC default port
|
|
|
|
environment:
|
|
|
|
- COLLECTOR_OTLP_ENABLED=true
|
|
|
|
- METRICS_STORAGE_TYPE=prometheus
|
|
|
|
|
|
|
|
# Grafana
|
|
|
|
grafana:
|
|
|
|
image: grafana/grafana:9.1.0
|
|
|
|
container_name: grafana
|
|
|
|
volumes:
|
|
|
|
- ./otel/grafana/grafana.ini:/etc/grafana/grafana.ini
|
|
|
|
- ./otel/grafana/provisioning/:/etc/grafana/provisioning/
|
|
|
|
ports:
|
2023-01-20 18:37:17 +01:00
|
|
|
- "3000:3000"
|
2023-01-05 15:33:53 +01:00
|
|
|
|
|
|
|
# OpenTelemetry Collector
|
|
|
|
otelcol:
|
|
|
|
image: otel/opentelemetry-collector-contrib:0.61.0
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 100M
|
|
|
|
restart: always
|
|
|
|
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ]
|
|
|
|
volumes:
|
|
|
|
- ./otel/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml
|
|
|
|
- ./otel/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml
|
|
|
|
ports:
|
|
|
|
- "4317:4317" # OTLP over gRPC receiver
|
|
|
|
- "4318:4318" # OTLP over HTTP receiver
|
|
|
|
- "9464" # Prometheus exporter
|
|
|
|
- "8888" # metrics endpoint
|
|
|
|
depends_on:
|
|
|
|
- jaeger
|
|
|
|
|
|
|
|
# Prometheus
|
|
|
|
prometheus:
|
|
|
|
image: quay.io/prometheus/prometheus:v2.34.0
|
|
|
|
container_name: prometheus
|
|
|
|
command:
|
|
|
|
- --web.console.templates=/etc/prometheus/consoles
|
|
|
|
- --web.console.libraries=/etc/prometheus/console_libraries
|
|
|
|
- --storage.tsdb.retention.time=1h
|
|
|
|
- --config.file=/etc/prometheus/prometheus-config.yaml
|
|
|
|
- --storage.tsdb.path=/prometheus
|
|
|
|
- --web.enable-lifecycle
|
|
|
|
- --web.route-prefix=/
|
|
|
|
volumes:
|
|
|
|
- ./otel/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml
|