hatchet icon indicating copy to clipboard operation
hatchet copied to clipboard

Where to find an up-to-date version of docker compose

Open sh1man opened this issue 8 months ago • 6 comments

I can't launch

sh1man@sh1man-ubuntu:~/PycharmProjects/asr/hatchet$ docker compose up -d
[+] Running 7/8
 ✔ Container hatchet-hatchet-frontend-1  Running                                                                                                                                             0.0s 
 ✔ Container hatchet-caddy-1             Running                                                                                                                                             0.0s 
 ✔ Container hatchet-postgres-1          Healthy                                                                                                                                             3.7s 
 ✔ Container hatchet-migration-1         Exited                                                                                                                                             13.8s 
 ✔ Container hatchet-setup-config-1      Exited                                                                                                                                             13.8s 
 ✔ Container hatchet-rabbitmq-1          Healthy                                                                                                                                            13.2s 
 ✔ Container hatchet-hatchet-engine-1    Running                                                                                                                                             0.0s 
 ⠙ Container hatchet-hatchet-api-1       Starting                                                                                                                                            0.1s 
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "/hatchet/hatchet-backend": stat /hatchet/hatchet-backend: no such file or directory: unknown
exit status 1
services:
  postgres:
    image: postgres:15.6
    command: postgres -c 'max_connections=200'
    restart: unless-stopped
    hostname: "postgres"
    environment:
      - POSTGRES_USER=hatchet
      - POSTGRES_PASSWORD=hatchet
      - POSTGRES_DB=hatchet
    ports:
      - "5435:5432"
    volumes:
      - hatchet_postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -d hatchet -U hatchet"]
      interval: 10s
      timeout: 10s
      retries: 5
      start_period: 10s
  rabbitmq:
    image: "rabbitmq:3-management"
    hostname: "rabbitmq"
    restart: unless-stopped
    ports:
      - "5673:5672" # RabbitMQ
      - "15673:15672" # Management UI
    environment:
      RABBITMQ_DEFAULT_USER: "user"
      RABBITMQ_DEFAULT_PASS: "password"
    volumes:
      - "hatchet_rabbitmq_data:/var/lib/rabbitmq"
      - "hatchet_rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf" # Configuration file mount
    healthcheck:
      test: ["CMD", "rabbitmqctl", "status"]
      interval: 10s
      timeout: 10s
      retries: 5
  migration:
    image: ghcr.io/hatchet-dev/hatchet/hatchet-migrate:latest
    environment:
      DATABASE_URL: "postgres://hatchet:hatchet@postgres:5432/hatchet"
    depends_on:
      postgres:
        condition: service_healthy
  setup-config:
    image: ghcr.io/hatchet-dev/hatchet/hatchet-admin:latest
    command: /hatchet/hatchet-admin quickstart --skip certs --generated-config-dir /hatchet/config --overwrite=false
    environment:
      DATABASE_URL: "postgres://hatchet:hatchet@postgres:5432/hatchet"
      DATABASE_POSTGRES_PORT: "5432"
      DATABASE_POSTGRES_HOST: "postgres"
      SERVER_TASKQUEUE_RABBITMQ_URL: amqp://user:password@rabbitmq:5672/
      SERVER_AUTH_COOKIE_DOMAIN: localhost:8080
      SERVER_AUTH_COOKIE_INSECURE: "t"
      SERVER_GRPC_BIND_ADDRESS: "0.0.0.0"
      SERVER_GRPC_INSECURE: "t"
      SERVER_GRPC_BROADCAST_ADDRESS: localhost:7077
    volumes:
      - hatchet_certs:/hatchet/certs
      - hatchet_config:/hatchet/config
    depends_on:
      migration:
        condition: service_completed_successfully
      rabbitmq:
        condition: service_healthy
      postgres:
        condition: service_healthy
  hatchet-engine:
    image: ghcr.io/hatchet-dev/hatchet/hatchet-engine:latest
    command: /hatchet/hatchet-engine --config /hatchet/config
    restart: unless-stopped
    depends_on:
      setup-config:
        condition: service_completed_successfully
      migration:
        condition: service_completed_successfully
    ports:
      - "7077:7070"
    environment:
      DATABASE_URL: "postgres://hatchet:hatchet@postgres:5432/hatchet"
      SERVER_GRPC_BIND_ADDRESS: "0.0.0.0"
      SERVER_GRPC_INSECURE: "t"
    volumes:
      - hatchet_certs:/hatchet/certs
      - hatchet_config:/hatchet/config
  hatchet-api:
    image: ghcr.io/hatchet-dev/hatchet/hatchet-api:latest
    command: /hatchet/hatchet-backend --config /hatchet/config
    restart: unless-stopped
    depends_on:
      setup-config:
        condition: service_completed_successfully
      migration:
        condition: service_completed_successfully
    environment:
      DATABASE_URL: "postgres://hatchet:hatchet@postgres:5432/hatchet"
    volumes:
      - hatchet_certs:/hatchet/certs
      - hatchet_config:/hatchet/config
  hatchet-frontend:
    image: ghcr.io/hatchet-dev/hatchet/hatchet-frontend:latest
    restart: unless-stopped
  caddy:
    image: caddy:2.7.6-alpine
    restart: unless-stopped
    ports:
      - 8080:8080
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile

volumes:
  hatchet_postgres_data:
  hatchet_rabbitmq_data:
  hatchet_rabbitmq.conf:
  hatchet_config:
  hatchet_certs:

sh1man avatar Mar 05 '25 08:03 sh1man

Me too

AndryHTC avatar Mar 31 '25 14:03 AndryHTC

It's not quite the same, but if you're just looking to get up and running quickly, you could try our starter: https://github.com/hominyai/hatchet-starter

git clone https://github.com/hominyai/hatchet-starter.git hatchet-starter && cd $_

docker compose up --build --watch

Note that the top commit added a demo emitter + listener to reproduce this bug: hatchet-dev/hatchet#1455

knksmith57 avatar Mar 31 '25 17:03 knksmith57

Hey @AndryHTC and @sh1man, I'm struggling to find where we've documented a docker-compose file with /hatchet/hatchet-backend as the command. It looks like replacing /hatchet/hatchet-backend with /hatchet/hatchet-api would fix it.

Could you point me to where this was set incorrectly?

Additionally, we were having an issue with /hatchet/hatchet-migrate not being set as the entrypoint automatically in the migration container, which is fixed in v0.57.1 that'll be released later today.

abelanger5 avatar Mar 31 '25 17:03 abelanger5

I've taken this one -> https://docs.hatchet.run/self-hosting/docker-compose

I had to comment the line 41 for the migration service

  migration:
    image: ghcr.io/hatchet-dev/hatchet/hatchet-migrate:latest
    # command: /hatchet/hatchet-migrate -> DOES NOT WORK

AndryHTC avatar Mar 31 '25 17:03 AndryHTC

@abelanger5 tell me when I can uncomment that row 😄

AndryHTC avatar Apr 02 '25 14:04 AndryHTC

@sh1man this issue goes away when you pin the actual latest version (v0.59.5 as of posting this) instead of latest when starting the container.

waydegilliam avatar Apr 25 '25 00:04 waydegilliam

This issue has been stale for 30 days. Please update the issue or comment to keep it active. Otherwise, it will be closed in 5 days.

github-actions[bot] avatar Sep 08 '25 08:09 github-actions[bot]