generated from hatchet-dev/hatchet-python-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
130 lines (129 loc) · 3.98 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
version: "3.8"
services:
postgres:
image: postgres:latest
command: postgres -c 'max_connections=200'
restart: always
hostname: "postgres-typescript-quickstart"
environment:
- POSTGRES_USER=hatchet
- POSTGRES_PASSWORD=hatchet
- POSTGRES_DB=hatchet
ports:
- "5435:5432"
volumes:
- hatchet_quickstart_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "hatchet"]
interval: 10s
timeout: 10s
retries: 5
start_period: 10s
rabbitmq:
image: "rabbitmq:3-management"
hostname: "rabbitmq-typescript-quickstart"
ports:
- "5673:5672" # RabbitMQ
- "15673:15672" # Management UI
environment:
RABBITMQ_DEFAULT_USER: "user"
RABBITMQ_DEFAULT_PASS: "password"
volumes:
- "hatchet_quickstart_rabbitmq_data:/var/lib/rabbitmq"
- "hatchet_quickstart_rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf" # Configuration file mount
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 10s
timeout: 10s
retries: 5
migration:
build:
context: .github/docker
dockerfile: migrate.dockerfile
environment:
DATABASE_URL: "postgres://hatchet:hatchet@postgres-typescript-quickstart:5432/hatchet"
depends_on:
postgres:
condition: service_healthy
setup-config:
build:
context: .github/docker
dockerfile: admin.dockerfile
command: /hatchet/hatchet-admin quickstart --cert-dir /hatchet/certs --generated-config-dir /hatchet/config --overwrite=false
environment:
DATABASE_URL: "postgres://hatchet:hatchet@postgres-typescript-quickstart:5432/hatchet"
DATABASE_POSTGRES_PORT: "5432"
DATABASE_POSTGRES_HOST: "postgres-typescript-quickstart"
SERVER_TASKQUEUE_RABBITMQ_URL: amqp://user:password@rabbitmq-typescript-quickstart:5672/
SERVER_AUTH_COOKIE_DOMAIN: localhost:8020
SERVER_GRPC_BIND_ADDRESS: "0.0.0.0"
SERVER_GRPC_BROADCAST_ADDRESS: "127.0.0.1:7077"
SERVER_GRPC_PORT: "7077"
SERVER_GRPC_INSECURE: "true"
volumes:
- ./certs:/hatchet/certs
- hatchet_quickstart_config:/hatchet/config
depends_on:
migration:
condition: service_completed_successfully
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
hatchet-engine:
build:
context: .github/docker
dockerfile: engine.dockerfile
command: /hatchet/hatchet-engine --config /hatchet/config
restart: on-failure
depends_on:
setup-config:
condition: service_completed_successfully
migration:
condition: service_completed_successfully
ports:
- "7077:7077"
environment:
DATABASE_URL: "postgres://hatchet:hatchet@postgres-typescript-quickstart:5432/hatchet"
SERVER_GRPC_BIND_ADDRESS: "0.0.0.0"
SERVER_GRPC_BROADCAST_ADDRESS: "127.0.0.1:7077"
SERVER_GRPC_PORT: "7077"
SERVER_GRPC_INSECURE: "true"
volumes:
- ./certs:/hatchet/certs
- hatchet_quickstart_config:/hatchet/config
hatchet-api:
build:
context: .github/docker
dockerfile: api.dockerfile
command: /hatchet/hatchet-api --config /hatchet/config
restart: on-failure
ports:
- "8088:8080"
depends_on:
setup-config:
condition: service_completed_successfully
migration:
condition: service_completed_successfully
environment:
DATABASE_URL: "postgres://hatchet:hatchet@postgres-typescript-quickstart:5432/hatchet"
volumes:
- ./certs:/hatchet/certs
- hatchet_quickstart_config:/hatchet/config
hatchet-frontend:
build:
context: .github/docker
dockerfile: frontend.dockerfile
ports:
- "9099:80"
caddy:
image: caddy:2.7.6-alpine
ports:
- 8020:80
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
volumes:
hatchet_quickstart_postgres_data:
hatchet_quickstart_rabbitmq_data:
hatchet_quickstart_rabbitmq.conf:
hatchet_quickstart_config: