version: '3.9' services: nginx: build: context: . dockerfile: ./Dockerfile.nginx ports: - '8000:80' volumes: - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf - ./public:/var/www/html/public links: - php-fpm php-fpm: build: context: . dockerfile: ./Dockerfile.fpm volumes: - ./:/var/www/html/ environment: - OTEL_LOG_LEVEL=debug - OTEL_TRACES_EXPORTER=otlp - OTEL_METRICS_EXPORTER=otlp - OTEL_LOGS_EXPORTER=otlp - OTEL_PHP_AUTOLOAD_ENABLED=true - OTEL_PHP_TRACES_PROCESSOR=simple - OTEL_PHP_LOG_DESTINATION=stderr - OTEL_EXPORTER_OTLP_PROTOCOL=grpc - OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317 - DATABASE_URL=pgsql://brilo:localdevelopment@postgres_dev/brilo - DATABASE_TEST_URL=pgsql://brilo_test:localdevelopment@postgres_test/brilo_test links: - otelcol - postgres_dev - postgres_test dns: # TODO: fix-me - 8.8.8.8 # ----------------- database postgres_dev: image: postgres:16.3 environment: - POSTGRES_USER=brilo - POSTGRES_PASSWORD=localdevelopment - POSTGRES_DB=brilo healthcheck: test: ["CMD-SHELL", "pg_isready", "-d", "brilo", "-u", "brilo"] interval: 30s timeout: 60s retries: 5 start_period: 80s postgres_test: image: postgres:16.3 environment: - POSTGRES_USER=brilo_test - POSTGRES_PASSWORD=localdevelopment - POSTGRES_DB=brilo_test healthcheck: test: ["CMD-SHELL", "pg_isready", "-d", "brilo_test", "-u", "brilo_test"] interval: 30s timeout: 60s retries: 5 start_period: 80s # ----------------- telemetry tempo: image: grafana/tempo:latest command: [ "-config.file=/etc/tempo.yaml" ] volumes: - ./docker/telemetry/tempo.yaml:/etc/tempo.yaml - ./.tempo:/tmp/tempo loki: image: grafana/loki:2.9.2 ports: - "3100:3100" command: -config.file=/etc/loki.yaml volumes: - ./.loki:/loki - ./docker/telemetry/loki.yaml:/etc/loki.yaml promtail: image: grafana/promtail:2.9.2 command: -config.file=/etc/promtail/config.yaml volumes: - ./docker/telemetry/promtail.yaml:/etc/promtail/config.yaml links: - prometheus prometheus: image: prom/prometheus:latest command: - --config.file=/etc/prometheus.yaml - --web.enable-remote-write-receiver - --enable-feature=exemplar-storage volumes: - ./docker/telemetry/prometheus.yaml:/etc/prometheus.yaml ports: - "9090:9090" grafana: image: grafana/grafana:10.1.1 volumes: - ./docker/telemetry/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: - GF_AUTH_ANONYMOUS_ENABLED=true - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin - GF_AUTH_DISABLE_LOGIN_FORM=true - GF_FEATURE_TOGGLES_ENABLE=traceqlEditor ports: - "3000:3000" otelcol: image: otel/opentelemetry-collector-contrib:latest deploy: resources: limits: memory: 125M restart: unless-stopped command: [ "--config=/etc/otelcol-config.yaml" ] volumes: - ./docker/telemetry/otelcol-config.yaml:/etc/otelcol-config.yaml depends_on: - loki - tempo links: - loki - tempo # TODO: networks networks: default: driver: "bridge" ipam: driver: default