From 4b00dda0caa43e89650c9e991198ec76df741936 Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Tue, 16 Dec 2025 17:24:16 -0500 Subject: [PATCH] hatchet init db --- docker-compose.yml | 21 +++++---------------- server/README.md | 10 ++++++++++ server/docker/init-hatchet-db.sql | 2 ++ 3 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 server/docker/init-hatchet-db.sql diff --git a/docker-compose.yml b/docker-compose.yml index a433a33c..c2e16f3c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,6 +69,7 @@ services: postgres: image: postgres:17 + command: postgres -c 'max_connections=200' ports: - 5432:5432 environment: @@ -77,21 +78,9 @@ services: POSTGRES_DB: reflector volumes: - ./data/postgres:/var/lib/postgresql/data - - hatchet-postgres: - image: postgres:15.6 - command: postgres -c 'max_connections=200' - restart: always - environment: - - POSTGRES_USER=hatchet - - POSTGRES_PASSWORD=hatchet - - POSTGRES_DB=hatchet - ports: - - "5436:5432" - volumes: - - ./data/hatchet-postgres:/var/lib/postgresql/data + - ./server/docker/init-hatchet-db.sql:/docker-entrypoint-initdb.d/init-hatchet-db.sql:ro healthcheck: - test: ["CMD-SHELL", "pg_isready -d hatchet -U hatchet"] + test: ["CMD-SHELL", "pg_isready -d reflector -U reflector"] interval: 10s timeout: 10s retries: 5 @@ -103,10 +92,10 @@ services: - "8889:8888" - "7078:7077" depends_on: - hatchet-postgres: + postgres: condition: service_healthy environment: - DATABASE_URL: "postgresql://hatchet:hatchet@hatchet-postgres:5432/hatchet?sslmode=disable" + DATABASE_URL: "postgresql://reflector:reflector@postgres:5432/hatchet?sslmode=disable" SERVER_AUTH_COOKIE_DOMAIN: localhost SERVER_AUTH_COOKIE_INSECURE: "t" SERVER_GRPC_BIND_ADDRESS: "0.0.0.0" diff --git a/server/README.md b/server/README.md index c078f493..a97962a0 100644 --- a/server/README.md +++ b/server/README.md @@ -53,6 +53,16 @@ response = sqs.receive_message(QueueUrl=queue_url, ...) uv run /app/requeue_uploaded_file.py TRANSCRIPT_ID ``` +## Hatchet Setup (Fresh DB) + +After resetting the Hatchet database: + +1. Create API token at http://localhost:8889 → Settings → API Tokens +2. Update `server/.env`: `HATCHET_CLIENT_TOKEN=` +3. Restart: `docker compose restart server hatchet-worker` + +Workflows register automatically when hatchet-worker starts. + ## Pipeline Management ### Continue stuck pipeline from final summaries (identify_participants) step: diff --git a/server/docker/init-hatchet-db.sql b/server/docker/init-hatchet-db.sql new file mode 100644 index 00000000..58814673 --- /dev/null +++ b/server/docker/init-hatchet-db.sql @@ -0,0 +1,2 @@ +-- Create hatchet database for Hatchet workflow engine +CREATE DATABASE hatchet;