version: '3.9' services: nginx: build: context: . dockerfile: ./Dockerfile.nginx ports: - '8000:80' volumes: - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf 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 - DB_CONNECTION=mysql - DB_URL=mysql://laravel:laravel@mariadb:3306/workingdays - SESSION_DRIVER=file links: - otelcol - mariadb depends_on: mariadb: condition: service_healthy dns: - 8.8.8.8 mariadb: image: mariadb:10.6 environment: - MYSQL_ROOT_PASSWORD=laravel - MYSQL_DATABASE=workingdays - MYSQL_USER=laravel - MYSQL_PASSWORD=laravel healthcheck: test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 10s retries: 10 # ----------------- 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