66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
name: nereus
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_DB: nereus
|
|
POSTGRES_USER: nereus
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U nereus -d nereus"]
|
|
interval: 2s
|
|
timeout: 3s
|
|
retries: 15
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
otel-collector:
|
|
image: otel/opentelemetry-collector-contrib:0.159.0
|
|
command: ["--config=/etc/otelcol-contrib/config.yaml"]
|
|
read_only: true
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
volumes:
|
|
- ./build/otel-collector.local.yaml:/etc/otelcol-contrib/config.yaml:ro
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: build/api.Dockerfile
|
|
args:
|
|
APP_VERSION: local
|
|
environment:
|
|
DATABASE_URL: postgres://nereus@postgres:5432/nereus?sslmode=disable
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
|
|
LOG_LEVEL: info
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
otel-collector:
|
|
condition: service_started
|
|
ports:
|
|
- "${API_PORT:-18080}:8080"
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp:size=16m,mode=1777
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
|
|
loadgen:
|
|
build:
|
|
context: .
|
|
dockerfile: build/loadgen.Dockerfile
|
|
environment:
|
|
TARGET_URL: http://api:8080
|
|
RPS: "5"
|
|
depends_on:
|
|
- api
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp:size=16m,mode=1777
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
|
|
volumes:
|
|
postgres-data:
|