-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (102 loc) · 2.72 KB
/
docker-compose.yml
File metadata and controls
108 lines (102 loc) · 2.72 KB
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
services:
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- PORT=8080
- TEMPORAL_HOST=temporal:7233
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/orchestrix?sslmode=disable
- KEYCLOAK_URL=http://host.docker.internal:8180
- KEYCLOAK_ISSUER_URL=http://localhost:8180
- KEYCLOAK_REALM=orchestrix
- KEYCLOAK_CLIENT_ID=orchestrix-web
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- postgres
- temporal
- keycloak
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 3
worker:
build:
context: .
dockerfile: Dockerfile.worker
environment:
- TEMPORAL_HOST=temporal:7233
- TEMPORAL_TASK_QUEUE=orchestrix-queue
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/orchestrix?sslmode=disable
depends_on:
- temporal
- postgres
postgres:
image: timescale/timescaledb:latest-pg16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: orchestrix
POSTGRES_MULTIPLE_DATABASES: orchestrix,keycloak
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
keycloak:
image: quay.io/keycloak/keycloak:26.0
command: start-dev --import-realm
ports:
- "8180:8080"
environment:
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://postgres:5432/keycloak
KC_DB_USERNAME: postgres
KC_DB_PASSWORD: postgres
KC_HOSTNAME_STRICT: "false"
KC_HTTP_ENABLED: "true"
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
volumes:
- ./keycloak/realm-orchestrix.json:/opt/keycloak/data/import/realm-orchestrix.json
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/8080"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
temporal:
image: temporalio/auto-setup:latest
ports:
- "7233:7233"
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PWD=postgres
- POSTGRES_SEEDS=postgres
depends_on:
postgres:
condition: service_healthy
temporal-ui:
image: temporalio/ui:latest
ports:
- "8088:8080"
environment:
- TEMPORAL_ADDRESS=temporal:7233
depends_on:
- temporal
volumes:
postgres_data: