Enable server host mode

This commit is contained in:
Sergey Mankovsky
2026-02-11 23:11:31 +01:00
parent 67aea78243
commit bba272505f

View File

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