services: axon: build: . ports: - "3000:3000" environment: NODE_ENV: production DATABASE_PATH: /data/axon.db # Copy .env.example → .env.local and fill in values, then uncomment: # ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY} # HELIUS_API_KEY: ${HELIUS_API_KEY} # NEXT_PUBLIC_PAYMENT_RECEIVER_WALLET_ADDRESS: ${NEXT_PUBLIC_PAYMENT_RECEIVER_WALLET_ADDRESS} # SOLANA_NETWORK: mainnet-beta # SEED_SECRET: ${SEED_SECRET} # CRON_SECRET: ${CRON_SECRET} # CORS_ORIGIN: "*" LOG_LEVEL: info # Allow the in-container SQLite to be used without a Turso setup: AXON_ALLOW_EPHEMERAL_DB: "false" volumes: - axon_data:/data restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"] interval: 30s timeout: 5s retries: 3 start_period: 20s # Task worker — processes queued tasks. Runs from the build stage (which has # the worker source + tsx) and shares the same SQLite volume as the web app. worker: build: context: . target: builder command: ["npx", "tsx", "src/workers/index.ts"] environment: NODE_ENV: production DATABASE_PATH: /data/axon.db LOG_LEVEL: info AXON_ALLOW_EPHEMERAL_DB: "false" # Mirror the same provider/payment keys you set on the axon service: # ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY} # HELIUS_API_KEY: ${HELIUS_API_KEY} # SOLANA_NETWORK: mainnet-beta volumes: - axon_data:/data depends_on: axon: condition: service_healthy restart: unless-stopped volumes: axon_data: driver: local