services: postgres: image: postgres:17-alpine environment: POSTGRES_DB: brandblitz POSTGRES_USER: brandblitz POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-brandblitz_dev} volumes: - postgres_data:/var/lib/postgresql/data - ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U brandblitz -d brandblitz"] interval: 10s timeout: 5s retries: 5 redis: image: redis:7-alpine command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 5 minio: image: minio/minio:latest command: server /data --console-address ":9001" environment: MINIO_ROOT_USER: ${MINIO_ROOT_USER:-brandblitz} MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-brandblitz123} volumes: - minio_data:/data healthcheck: test: ["CMD", "mc", "ready", "local"] interval: 15s timeout: 10s retries: 5 minio-setup: image: minio/mc:latest depends_on: minio: condition: service_healthy entrypoint: > /bin/sh -c " mc alias set local http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD && mc mb --ignore-existing local/brandblitz-assets && mc anonymous set download local/brandblitz-assets " environment: MINIO_ROOT_USER: ${MINIO_ROOT_USER:-brandblitz} MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-brandblitz123} restart: on-failure api: build: context: . dockerfile: apps/api/Dockerfile environment: NODE_ENV: ${NODE_ENV:-development} PORT: 3001 DATABASE_URL: postgresql://brandblitz:${POSTGRES_PASSWORD:-brandblitz_dev}@postgres:5432/brandblitz REDIS_URL: redis://redis:6379 JWT_SECRET: ${JWT_SECRET} GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID} GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET} STELLAR_NETWORK: ${STELLAR_NETWORK:-testnet} STELLAR_HORIZON_URL: ${STELLAR_HORIZON_URL:-https://horizon-testnet.stellar.org} STELLAR_RPC_URL: ${STELLAR_RPC_URL:-https://soroban-testnet.stellar.org} STELLAR_HOT_WALLET_SECRET: ${STELLAR_HOT_WALLET_SECRET} USDC_ISSUER: ${USDC_ISSUER:-GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5} S3_ENDPOINT: ${S3_ENDPOINT:-http://minio:9000} S3_REGION: ${S3_REGION:-us-east-1} S3_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-brandblitz} S3_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-brandblitz123} S3_BUCKET: ${S3_BUCKET:-brandblitz-assets} S3_PUBLIC_URL: ${S3_PUBLIC_URL:-http://localhost:9000/brandblitz-assets} S3_FORCE_PATH_STYLE: "true" TWILIO_ACCOUNT_SID: ${TWILIO_ACCOUNT_SID:-} TWILIO_AUTH_TOKEN: ${TWILIO_AUTH_TOKEN:-} TWILIO_VERIFY_SERVICE_SID: ${TWILIO_VERIFY_SERVICE_SID:-} WEBHOOK_SECRET: ${WEBHOOK_SECRET} NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000} depends_on: postgres: condition: service_healthy redis: condition: service_healthy minio: condition: service_healthy worker: build: context: . dockerfile: apps/api/Dockerfile command: ["node", "dist/worker.js"] environment: NODE_ENV: ${NODE_ENV:-development} DATABASE_URL: postgresql://brandblitz:${POSTGRES_PASSWORD:-brandblitz_dev}@postgres:5432/brandblitz REDIS_URL: redis://redis:6379 STELLAR_NETWORK: ${STELLAR_NETWORK:-testnet} STELLAR_HORIZON_URL: ${STELLAR_HORIZON_URL:-https://horizon-testnet.stellar.org} STELLAR_RPC_URL: ${STELLAR_RPC_URL:-https://soroban-testnet.stellar.org} STELLAR_HOT_WALLET_SECRET: ${STELLAR_HOT_WALLET_SECRET} USDC_ISSUER: ${USDC_ISSUER:-GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5} S3_ENDPOINT: ${S3_ENDPOINT:-http://minio:9000} S3_REGION: ${S3_REGION:-us-east-1} S3_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-brandblitz} S3_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-brandblitz123} S3_BUCKET: ${S3_BUCKET:-brandblitz-assets} S3_PUBLIC_URL: ${S3_PUBLIC_URL:-http://localhost:9000/brandblitz-assets} S3_FORCE_PATH_STYLE: "true" depends_on: postgres: condition: service_healthy redis: condition: service_healthy web: build: context: . dockerfile: apps/web/Dockerfile args: NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost/api} NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000} environment: NEXTAUTH_SECRET: ${NEXTAUTH_SECRET} NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000} NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost/api} GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID} GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET} depends_on: - api nginx: image: nginx:1.25-alpine ports: - "80:80" volumes: - ./nginx/nginx.dev.conf:/etc/nginx/conf.d/default.conf:ro depends_on: - web - api volumes: postgres_data: redis_data: minio_data: