name: awsify services: redis: image: redis:7-alpine restart: unless-stopped # noeviction is required by BullMQ so queued jobs are never dropped under # memory pressure; appendonly persists the queue across restarts. command: ["redis-server", "--appendonly", "yes", "--maxmemory-policy", "noeviction"] volumes: - redis-data:/data networks: [edge] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 10 logging: driver: "json-file" options: max-size: "200m" max-file: "10" web: build: context: .. dockerfile: apps/web/Dockerfile args: NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL} image: awsify-web:latest restart: unless-stopped env_file: .env environment: PORT: 3000 HOSTNAME: 0.0.0.0 expose: - "3000" networks: [edge] logging: driver: "json-file" options: max-size: "200m" max-file: "10" web-preview: profiles: [preview] build: context: ${PREVIEW_SOURCE_DIR} dockerfile: apps/web/Dockerfile args: NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL} image: awsify-web-preview:latest restart: unless-stopped environment: PORT: 3000 HOSTNAME: 0.0.0.0 expose: - "3000" networks: [edge] logging: driver: "json-file" options: max-size: "200m" max-file: "10" api: build: context: .. dockerfile: apps/api/Dockerfile image: awsify-api:latest restart: unless-stopped env_file: .env environment: PORT: 4000 expose: - "4000" depends_on: redis: condition: service_healthy networks: [edge] logging: driver: "json-file" options: max-size: "200m" max-file: "10" worker: build: context: .. dockerfile: apps/worker/Dockerfile image: awsify-worker:latest restart: unless-stopped env_file: .env environment: # Persist Pulumi stack state on a volume so retries/rebuilds don't recreate # resources that already exist. AWSIFY_PULUMI_STATE_DIR: /root/.pulumi/awsify-state volumes: - /var/run/docker.sock:/var/run/docker.sock - pulumi-state:/root/.pulumi depends_on: redis: condition: service_healthy networks: [edge] logging: driver: "json-file" options: max-size: "200m" max-file: "10" caddy: image: caddy:2-alpine restart: unless-stopped ports: - "80:80" - "443:443" env_file: .env volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - caddy-data:/data - caddy-config:/config depends_on: [web, api] networks: [edge] logging: driver: "json-file" options: max-size: "200m" max-file: "10" networks: edge: volumes: caddy-data: caddy-config: pulumi-state: redis-data: