version: "3.4" x-restart-policy: &restart_policy restart: unless-stopped services: postgres: <<: *restart_policy env_file: - .env image: postgres:14.6 ports: - "5432:5432" volumes: - "dispatch-postgres:/var/lib/postgresql/data" core: image: dispatch-local env_file: - .env build: # Pro-tip: point this to a relative directory containing the Dispatch # project root to pick up changes from your dev environment # (e.g., ../dispatch-root) context: https://github.com/Netflix/dispatch.git#latest web: <<: *restart_policy image: dispatch-local depends_on: - postgres - core env_file: - .env command: ["server", "start", "dispatch.main:app", "--host=0.0.0.0"] ports: - "8000:8000" scheduler: <<: *restart_policy image: dispatch-local depends_on: - postgres - core env_file: - .env environment: - STATIC_DIR= command: ["scheduler", "start"] volumes: dispatch-postgres: external: true