-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
169 lines (159 loc) · 3.54 KB
/
docker-compose.yaml
File metadata and controls
169 lines (159 loc) · 3.54 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
services:
traefik:
image: "traefik:v3.6"
restart: unless-stopped
security_opt:
- no-new-privileges:true
command:
- "--api.insecure=true"
- "--entryPoints.web.address=:80"
- "--providers.file.filename=/etc/traefik/dynamic.yml"
ports:
- "80:80"
- "8080:8080" # Traefik dashboard
configs:
- source: traefik_dynamic
target: /etc/traefik/dynamic.yml
networks:
- proxy
- default
labels:
portway.ignore: "true"
postgres:
image: postgres:18
platform: linux/amd64
restart: always
env_file: .env.compose
expose:
- 5432
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ctrlplane -d ctrlplane"]
interval: 10s
timeout: 5s
retries: 5
networks:
- proxy
redpanda:
image: redpandadata/redpanda:v24.3.18
command:
- redpanda start
- --smp 1
- --overprovisioned
- --node-id 0
- --kafka-addr PLAINTEXT://0.0.0.0:9092
- --advertise-kafka-addr PLAINTEXT://redpanda:9092
- --set redpanda.auto_create_topics_enabled=true
- --set redpanda.default_topic_partitions=3
expose:
- 9092
volumes:
- redpanda_data:/var/redpanda/data
networks:
- proxy
migrations:
image: ctrlplane/migrations:f8e3076
platform: linux/amd64
restart: "no"
env_file: .env.compose
depends_on:
postgres:
condition: service_healthy
networks:
- proxy
workspace-engine:
image: ctrlplane/workspace-engine:44eec79
platform: linux/amd64
restart: always
env_file: .env.compose
environment:
REGISTER_ADDRESS: http://workspace-engine:8081
HOST: workspace-engine
PORT: 8081
expose:
- 8081
depends_on:
- workspace-engine-router
- postgres
- migrations
- redpanda
networks:
- proxy
workspace-engine-router:
image: ctrlplane/workspace-engine-router:a9b9bd7
platform: linux/amd64
restart: always
env_file: .env.compose
environment:
HOST: 0.0.0.0
expose:
- 9091
- 9090
networks:
- proxy
- default
api:
image: ctrlplane/api:373492e
platform: linux/amd64
restart: always
env_file: .env.compose
environment:
WORKSPACE_ENGINE_ROUTER_URL: http://workspace-engine-router:9090
ports:
- "8081:8081"
depends_on:
- postgres
- redpanda
- workspace-engine-router
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/api/healthz"]
interval: 10s
timeout: 5s
retries: 5
networks:
- proxy
labels:
portway.route.path: /api
web:
image: ctrlplane/web:373492e
platform: linux/amd64
restart: always
env_file: .env.compose
ports:
- "3000:3000"
depends_on:
- api
networks:
- proxy
labels:
portway.route.path: /
volumes:
postgres_data:
redpanda_data:
configs:
traefik_dynamic:
content: |
http:
routers:
api:
rule: "PathPrefix(`/api`)"
entryPoints: [web]
service: api
web:
rule: "PathPrefix(`/`)"
entryPoints: [web]
service: web
priority: 1
services:
api:
loadBalancer:
servers:
- url: "http://api:8081"
web:
loadBalancer:
servers:
- url: "http://web:3000"
networks:
proxy:
name: proxy