forked from mtusi2026/mtusi2026lab7
3_grade_report
This commit is contained in:
+19
-10
@@ -4,9 +4,18 @@ x-api-common: &api-common
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- OPENBAO_ADDR=http://openbao:8200
|
||||
- OPENBAO_TOKEN=root
|
||||
- DATABASE_URL=postgresql://messenger:messenger_password@postgres:5432/messenger
|
||||
- S3_ACCESS_KEY=minioadmin
|
||||
- S3_SECRET_KEY=minioadmin
|
||||
- S3_ENDPOINT=http://minio:9000
|
||||
- BROKER_URL=amqp://guest:guest@broker:5672/
|
||||
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
|
||||
- OTEL_SERVICE_NAME=messenger-api
|
||||
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=lab7
|
||||
|
||||
expose:
|
||||
- "8443"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
@@ -37,13 +46,9 @@ services:
|
||||
|
||||
api1:
|
||||
<<: *api-common
|
||||
expose:
|
||||
- "8080"
|
||||
|
||||
api2:
|
||||
<<: *api-common
|
||||
expose:
|
||||
- "8080"
|
||||
|
||||
worker:
|
||||
build:
|
||||
@@ -52,6 +57,12 @@ services:
|
||||
command: python -m worker.main
|
||||
environment:
|
||||
- OPENBAO_ADDR=http://openbao:8200
|
||||
- OPENBAO_TOKEN=root
|
||||
- DATABASE_URL=postgresql://messenger:messenger_password@postgres:5432/messenger
|
||||
- S3_ACCESS_KEY=minioadmin
|
||||
- S3_SECRET_KEY=minioadmin
|
||||
- S3_ENDPOINT=http://minio:9000
|
||||
- BROKER_URL=amqp://guest:guest@broker:5672/
|
||||
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
|
||||
- OTEL_SERVICE_NAME=messenger-worker
|
||||
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=lab7
|
||||
@@ -78,11 +89,15 @@ services:
|
||||
command: python scripts/migrate.py
|
||||
environment:
|
||||
- OPENBAO_ADDR=http://openbao:8200
|
||||
- OPENBAO_TOKEN=root
|
||||
- DATABASE_URL=postgresql://messenger:messenger_password@postgres:5432/messenger
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
openbao:
|
||||
condition: service_started
|
||||
init-openbao:
|
||||
condition: service_completed_successfully
|
||||
|
||||
openbao:
|
||||
image: openbao/openbao:2.0.0
|
||||
@@ -162,8 +177,6 @@ services:
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:0.95.0
|
||||
command: ["--config=/etc/otelcol/config.yaml"]
|
||||
volumes:
|
||||
- ./observability/otel-collector-config.yaml:/etc/otelcol/config.yaml:ro
|
||||
depends_on:
|
||||
- tempo
|
||||
- loki
|
||||
@@ -174,8 +187,6 @@ services:
|
||||
- "--config.file=/etc/prometheus/prometheus.yml"
|
||||
- "--storage.tsdb.path=/prometheus"
|
||||
volumes:
|
||||
- ./observability/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- ./observability/prometheus/alerts.yml:/etc/prometheus/alerts.yml:ro
|
||||
- promdata:/prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
@@ -184,7 +195,6 @@ services:
|
||||
image: grafana/loki:2.9.4
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
volumes:
|
||||
- ./observability/loki/loki-config.yaml:/etc/loki/local-config.yaml:ro
|
||||
- lokidata:/loki
|
||||
ports:
|
||||
- "3100:3100"
|
||||
@@ -193,7 +203,6 @@ services:
|
||||
image: grafana/tempo:2.4.0
|
||||
command: [ "-config.file=/etc/tempo.yaml" ]
|
||||
volumes:
|
||||
- ./observability/tempo/tempo-config.yaml:/etc/tempo.yaml:ro
|
||||
- tempodata:/var/tempo
|
||||
ports:
|
||||
- "3200:3200"
|
||||
|
||||
Reference in New Issue
Block a user