Add compose and Hatchet deployment config
This commit is contained in:
2
backend
2
backend
Submodule backend updated: f570b17dfb...504a798c4b
55
compose/docker-compose.yml
Normal file
55
compose/docker-compose.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ../backend
|
||||
dockerfile: Dockerfile
|
||||
depends_on:
|
||||
mapflow-db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
HOST: "0.0.0.0"
|
||||
PORT: "4000"
|
||||
DATABASE_URL: "${DATABASE_URL:-postgresql://mapflow:mapflow@mapflow-db:5432/mapflow}"
|
||||
HATCHET_CLIENT_TOKEN: "${HATCHET_CLIENT_TOKEN:-}"
|
||||
HATCHET_CLIENT_TLS_STRATEGY: "${HATCHET_CLIENT_TLS_STRATEGY:-none}"
|
||||
HATCHET_CLIENT_HOST_PORT: "${HATCHET_CLIENT_HOST_PORT:-mapflow-hatchet-engine:7070}"
|
||||
expose:
|
||||
- "4000"
|
||||
restart: unless-stopped
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: ../worker
|
||||
dockerfile: Dockerfile
|
||||
depends_on:
|
||||
mapflow-db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DATABASE_URL: "${DATABASE_URL:-postgresql://mapflow:mapflow@mapflow-db:5432/mapflow}"
|
||||
HATCHET_CLIENT_TOKEN: "${HATCHET_CLIENT_TOKEN:-}"
|
||||
HATCHET_CLIENT_TLS_STRATEGY: "${HATCHET_CLIENT_TLS_STRATEGY:-none}"
|
||||
HATCHET_CLIENT_HOST_PORT: "${HATCHET_CLIENT_HOST_PORT:-mapflow-hatchet-engine:7070}"
|
||||
HATCHET_WORKER_NAME: "${HATCHET_WORKER_NAME:-mapflow-hatchet-worker}"
|
||||
HATCHET_WORKER_SLOTS: "${HATCHET_WORKER_SLOTS:-4}"
|
||||
restart: unless-stopped
|
||||
|
||||
mapflow-db:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_DB: mapflow
|
||||
POSTGRES_USER: mapflow
|
||||
POSTGRES_PASSWORD: mapflow
|
||||
expose:
|
||||
- "5432"
|
||||
volumes:
|
||||
- mapflow_db_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -d mapflow -U mapflow"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
mapflow_db_data:
|
||||
@@ -4,6 +4,7 @@ version = 1
|
||||
flutter = { deploy_mode = "dokploy_webhook", server = "main" }
|
||||
backend = { deploy_mode = "dokploy_webhook", server = "main" }
|
||||
worker = { deploy_mode = "dokploy_webhook", server = "main" }
|
||||
hatchet = { deploy_mode = "dokploy_webhook", server = "main" }
|
||||
|
||||
[servers]
|
||||
main = { tailscale_user = "root", tailscale_name = "dsrptlab" }
|
||||
|
||||
102
hatchet/docker-compose.yml
Normal file
102
hatchet/docker-compose.yml
Normal file
@@ -0,0 +1,102 @@
|
||||
services:
|
||||
hatchet-postgres:
|
||||
image: postgres:15.6
|
||||
command: postgres -c "max_connections=1000"
|
||||
restart: always
|
||||
hostname: hatchet-postgres
|
||||
environment:
|
||||
POSTGRES_USER: hatchet
|
||||
POSTGRES_PASSWORD: hatchet
|
||||
POSTGRES_DB: hatchet
|
||||
expose:
|
||||
- "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
|
||||
|
||||
migration:
|
||||
image: ghcr.io/hatchet-dev/hatchet/hatchet-migrate:latest
|
||||
command: /hatchet/hatchet-migrate
|
||||
environment:
|
||||
DATABASE_URL: postgres://hatchet:hatchet@hatchet-postgres:5432/hatchet
|
||||
depends_on:
|
||||
hatchet-postgres:
|
||||
condition: service_healthy
|
||||
|
||||
setup-config:
|
||||
image: ghcr.io/hatchet-dev/hatchet/hatchet-admin:latest
|
||||
command: /hatchet/hatchet-admin quickstart --skip certs --skip keys --skip seed --generated-config-dir /hatchet/config --overwrite
|
||||
environment:
|
||||
DATABASE_URL: postgres://hatchet:hatchet@hatchet-postgres:5432/hatchet
|
||||
SERVER_MSGQUEUE_KIND: postgres
|
||||
SERVER_URL: "${HATCHET_SERVER_URL:-https://hatchet.mapflow.dsrptlab.com}"
|
||||
SERVER_AUTH_COOKIE_DOMAIN: "${HATCHET_COOKIE_DOMAIN:-hatchet.mapflow.dsrptlab.com}"
|
||||
SERVER_AUTH_COOKIE_INSECURE: "${HATCHET_COOKIE_INSECURE:-f}"
|
||||
SERVER_GRPC_BIND_ADDRESS: 0.0.0.0
|
||||
SERVER_GRPC_INSECURE: "t"
|
||||
SERVER_GRPC_BROADCAST_ADDRESS: hatchet-engine:7070
|
||||
SERVER_DEFAULT_ENGINE_VERSION: V1
|
||||
SERVER_INTERNAL_CLIENT_INTERNAL_GRPC_BROADCAST_ADDRESS: hatchet-engine:7070
|
||||
volumes:
|
||||
- hatchet_certs:/hatchet/certs
|
||||
- hatchet_config:/hatchet/config
|
||||
depends_on:
|
||||
migration:
|
||||
condition: service_completed_successfully
|
||||
hatchet-postgres:
|
||||
condition: service_healthy
|
||||
|
||||
hatchet-engine:
|
||||
image: ghcr.io/hatchet-dev/hatchet/hatchet-engine:latest
|
||||
command: /hatchet/hatchet-engine --config /hatchet/config
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
setup-config:
|
||||
condition: service_completed_successfully
|
||||
migration:
|
||||
condition: service_completed_successfully
|
||||
expose:
|
||||
- "7070"
|
||||
environment:
|
||||
DATABASE_URL: postgres://hatchet: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
|
||||
networks:
|
||||
default: {}
|
||||
dokploy-network:
|
||||
aliases:
|
||||
- mapflow-hatchet-engine
|
||||
|
||||
hatchet-dashboard:
|
||||
image: ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:latest
|
||||
command: sh ./entrypoint.sh --config /hatchet/config
|
||||
expose:
|
||||
- "80"
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
setup-config:
|
||||
condition: service_completed_successfully
|
||||
migration:
|
||||
condition: service_completed_successfully
|
||||
environment:
|
||||
DATABASE_URL: postgres://hatchet:hatchet@hatchet-postgres:5432/hatchet
|
||||
volumes:
|
||||
- hatchet_certs:/hatchet/certs
|
||||
- hatchet_config:/hatchet/config
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
hatchet_postgres_data:
|
||||
hatchet_config:
|
||||
hatchet_certs:
|
||||
2
worker
2
worker
Submodule worker updated: e87f9b3c57...21e9f8703c
Reference in New Issue
Block a user