services: dd-agent: image: registry.datadoghq.com/agent:${DD_AGENT_VERSION:-latest} pid: host environment: - DD_API_KEY=${DD_API_KEY} - DD_ENV=${DD_ENV:-production} - DD_LOGS_ENABLED=true - DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true - DD_CONTAINER_EXCLUDE=image:agent name:puppeteer - DD_CLOUD_PROVIDER_METADATA=[] - DD_HOSTNAME=${DD_HOSTNAME:-production-host} - DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true networks: - storedog-network volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - /var/lib/docker/containers:/var/lib/docker/containers:ro - /proc/:/host/proc/:ro - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro - postgres_logs:/var/log/pg_log:ro frontend: image: ghcr.io/datadog/storedog/frontend:${STOREDOG_IMAGE_VERSION:-latest} command: bash -c "wait-for-it backend:4000 -- ${FRONTEND_COMMAND:-npm run prod}" depends_on: - worker - dd-agent - backend networks: - storedog-network environment: - DD_AGENT_HOST=dd-agent - DD_ENV=${DD_ENV:-production} - DD_SERVICE=store-frontend-api # used for Next.js API routes - DD_VERSION=${NEXT_PUBLIC_DD_VERSION_FRONTEND:-1.0.0} - DD_RUNTIME_METRICS_ENABLED=true - DD_PROFILING_ENABLED=true - DD_PROFILING_TIMELINE_ENABLED=true - DD_PROFILING_ALLOCATION_ENABLED=true - NEXT_PUBLIC_DD_APPLICATION_ID=${NEXT_PUBLIC_DD_APPLICATION_ID:-DD_APPLICATION_ID-not-set} - NEXT_PUBLIC_DD_CLIENT_TOKEN=${NEXT_PUBLIC_DD_CLIENT_TOKEN:-DD_CLIENT_TOKEN-not-set} - NEXT_PUBLIC_DD_SITE=${NEXT_PUBLIC_DD_SITE:-datadoghq.com} - NEXT_PUBLIC_DD_SERVICE_FRONTEND=store-frontend # used for client-side Next.js RUM configuration - NEXT_PUBLIC_DD_ENV=${DD_ENV:-production} - NEXT_PUBLIC_DD_VERSION_FRONTEND=${NEXT_PUBLIC_DD_VERSION_FRONTEND:-1.0.0} labels: com.datadoghq.ad.logs: '[{"source": "nodejs", "auto_multi_line_detection": true }]' backend: image: ghcr.io/datadog/storedog/backend:${STOREDOG_IMAGE_VERSION:-latest} command: bundle exec ddprofrb exec rails s -b 0.0.0.0 -p 4000 --pid /app/tmp/pids/server.pid depends_on: postgres: condition: service_healthy redis: condition: service_started dd-agent: condition: service_started networks: - storedog-network environment: - DD_AGENT_HOST=dd-agent - DD_ENV=${DD_ENV:-production} - DD_SERVICE=store-backend - DD_VERSION=${DD_VERSION_BACKEND:-1.0.0} - DD_RUNTIME_METRICS_ENABLED=true - DD_PROFILING_ENABLED=true - DD_PROFILING_TIMELINE_ENABLED=true - DD_PROFILING_ALLOCATION_ENABLED=true labels: com.datadoghq.ad.logs: '[{"source": "ruby", "auto_multi_line_detection": true }]' worker: image: ghcr.io/datadog/storedog/backend:${STOREDOG_IMAGE_VERSION:-latest} command: bundle exec ddprofrb exec sidekiq -C config/sidekiq.yml depends_on: postgres: condition: service_healthy redis: condition: service_started backend: condition: service_started dd-agent: condition: service_started networks: - storedog-network environment: - WORKER=true - DD_AGENT_HOST=dd-agent - DD_ENV=${DD_ENV:-production} - DD_SERVICE=store-worker - DD_VERSION=${DD_VERSION_BACKEND:-1.0.0} - DD_RUNTIME_METRICS_ENABLED=true - DD_PROFILING_ENABLED=true - DD_PROFILING_TIMELINE_ENABLED=true - DD_PROFILING_ALLOCATION_ENABLED=true labels: com.datadoghq.ad.logs: '[{"source": "ruby", "auto_multi_line_detection": true }]' discounts: image: ghcr.io/datadog/storedog/discounts:${STOREDOG_IMAGE_VERSION:-latest} command: ddtrace-run flask run --port=2814 --host=0.0.0.0 depends_on: postgres: condition: service_healthy dd-agent: condition: service_started environment: - DD_AGENT_HOST=dd-agent - DD_ENV=${DD_ENV:-production} - DD_SERVICE=store-discounts - DD_VERSION=${DD_VERSION_DISCOUNTS:-1.0.0} - DD_RUNTIME_METRICS_ENABLED=true - DD_PROFILING_ENABLED=true - DD_PROFILING_TIMELINE_ENABLED=true - DD_PROFILING_ALLOCATION_ENABLED=true networks: - storedog-network labels: com.datadoghq.ad.logs: '[{"source": "python"}]' ads: image: ghcr.io/datadog/storedog/ads-java:${STOREDOG_IMAGE_VERSION:-latest} depends_on: postgres: condition: service_healthy dd-agent: condition: service_started environment: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres} - POSTGRES_USER=${POSTGRES_USER:-postgres} - POSTGRES_HOST=postgres - DD_AGENT_HOST=dd-agent - DD_ENV=${DD_ENV:-production} - DD_SERVICE=store-ads - DD_VERSION=${DD_VERSION_ADS:-1.0.0} - DD_PROFILING_ENABLED=true - DD_PROFILING_TIMELINE_ENABLED=true - DD_PROFILING_ALLOCATION_ENABLED=true networks: - storedog-network labels: com.datadoghq.ad.logs: '[{"source": "java"}]' com.datadoghq.tags.service: 'store-ads' com.datadoghq.tags.version: '${DD_VERSION_ADS:-1.0.0}' service-proxy: image: ghcr.io/datadog/storedog/nginx:${STOREDOG_IMAGE_VERSION:-latest} restart: always ports: - '80:80' networks: - storedog-network depends_on: - frontend - dd-agent environment: - DD_AGENT_HOST=dd-agent - DD_ENV=${DD_ENV:-production} - DD_SERVICE=service-proxy - DD_VERSION=${DD_VERSION_NGINX:-1.28.0} labels: com.datadoghq.ad.logs: '[{"source": "nginx"}]' com.datadoghq.ad.check_names: '["nginx"]' com.datadoghq.ad.init_configs: '[{}]' com.datadoghq.ad.instances: '[{"nginx_status_url": "http://%%host%%:81/nginx_status/"}]' postgres: image: ghcr.io/datadog/storedog/postgres:${STOREDOG_IMAGE_VERSION:-latest} restart: always depends_on: - dd-agent healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 10 volumes: - postgres_logs:/var/log/pg_log:rw networks: - storedog-network environment: - POSTGRES_USER=${POSTGRES_USER:-postgres} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres} labels: com.datadoghq.tags.service: 'store-db' com.datadoghq.tags.version: '${DD_VERSION_POSTGRES:-15.0}' com.datadoghq.ad.check_names: '["postgres"]' com.datadoghq.ad.init_configs: '[{}]' com.datadoghq.ad.instances: '[{"host":"%%host%%", "port":5432, "username":"datadog", "password":"datadog"}]' com.datadoghq.ad.logs: '[{"source": "postgresql", "service":"store-db", "auto_multi_line_detection": true, "path": "/var/log/pg_log/postgresql*.json", "type": "file"}]' redis: image: redis:6.2-alpine depends_on: - dd-agent volumes: - 'redis:/data' networks: - storedog-network labels: com.datadoghq.tags.service: 'redis' com.datadoghq.tags.version: '${DD_VERSION_REDIS:-6.2}' com.datadoghq.ad.check_names: '["redisdb"]' com.datadoghq.ad.init_configs: '[{}]' com.datadoghq.ad.instances: '[{"host":"%%host%%", "port":6379}]' com.datadoghq.ad.logs: '[{"source": "redis", "service": "redis"}]' puppeteer: image: ghcr.io/datadog/storedog/puppeteer:${STOREDOG_IMAGE_VERSION:-latest} platform: linux/amd64 environment: - STOREDOG_URL=${STOREDOG_URL:-http://service-proxy:80} - PUPPETEER_TIMEOUT=${PUPPETEER_TIMEOUT:-30000} networks: - storedog-network depends_on: - frontend shm_size: '4gb' # Increase shared memory size cap_add: - 'SYS_ADMIN' # Required for Puppeteer to run in Docker volumes: redis: postgres_logs: networks: storedog-network: