diff --git a/docker-compose.yml b/docker-compose.yml index aa46b715..81f8a553 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,8 +2,7 @@ services: server: build: context: server - ports: - - 1250:1250 + network_mode: host volumes: - ./server/:/app/ - /app/.venv @@ -11,10 +10,12 @@ services: - ./server/.env environment: ENTRYPOINT: server - HATCHET_CLIENT_SERVER_URL: http://hatchet:8888 - HATCHET_CLIENT_HOST_PORT: hatchet:7077 - extra_hosts: - - "host.docker.internal:host-gateway" + DATABASE_URL: postgresql+asyncpg://reflector:reflector@localhost:5432/reflector + REDIS_HOST: localhost + CELERY_BROKER_URL: redis://localhost:6379/1 + CELERY_RESULT_BACKEND: redis://localhost:6379/1 + HATCHET_CLIENT_SERVER_URL: http://localhost:8889 + HATCHET_CLIENT_HOST_PORT: localhost:7078 worker: build: @@ -28,6 +29,9 @@ services: ENTRYPOINT: worker HATCHET_CLIENT_SERVER_URL: http://hatchet:8888 HATCHET_CLIENT_HOST_PORT: hatchet:7077 + depends_on: + redis: + condition: service_started beat: build: @@ -39,6 +43,9 @@ services: - ./server/.env environment: ENTRYPOINT: beat + depends_on: + redis: + condition: service_started hatchet-worker-cpu: build: @@ -67,8 +74,6 @@ services: ENTRYPOINT: hatchet-worker-llm HATCHET_CLIENT_SERVER_URL: http://hatchet:8888 HATCHET_CLIENT_HOST_PORT: hatchet:7077 - extra_hosts: - - "host.docker.internal:host-gateway" depends_on: hatchet: condition: service_healthy @@ -92,6 +97,11 @@ services: - ./www/.env.local environment: - NODE_ENV=development + - SERVER_API_URL=http://host.docker.internal:1250 + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + - server postgres: image: postgres:17 @@ -107,13 +117,14 @@ services: - ./server/docker/init-hatchet-db.sql:/docker-entrypoint-initdb.d/init-hatchet-db.sql:ro healthcheck: test: ["CMD-SHELL", "pg_isready -d reflector -U reflector"] - interval: 10s - timeout: 10s - retries: 5 - start_period: 10s + interval: 5s + timeout: 5s + retries: 10 + start_period: 15s hatchet: image: ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest + restart: on-failure ports: - "8889:8888" - "7078:7077" @@ -121,7 +132,7 @@ services: postgres: condition: service_healthy environment: - DATABASE_URL: "postgresql://reflector:reflector@postgres:5432/hatchet?sslmode=disable" + DATABASE_URL: "postgresql://reflector:reflector@postgres:5432/hatchet?sslmode=disable&connect_timeout=30" SERVER_AUTH_COOKIE_DOMAIN: localhost SERVER_AUTH_COOKIE_INSECURE: "t" SERVER_GRPC_BIND_ADDRESS: "0.0.0.0" @@ -143,7 +154,3 @@ services: volumes: next_cache: - -networks: - default: - attachable: true