-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.railway.yml
More file actions
211 lines (202 loc) · 7.98 KB
/
docker-compose.railway.yml
File metadata and controls
211 lines (202 loc) · 7.98 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- postgres_railway_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
temporal:
image: temporalio/auto-setup:1.22.0
environment:
DB: postgresql
DB_PORT: "5432"
POSTGRES_USER: postgres
POSTGRES_PWD: postgres
POSTGRES_SEEDS: postgres.railway.internal
depends_on:
postgres:
condition: service_healthy
migrations:
build:
context: .
dockerfile: controller/Dockerfile
command: ["sh", "-c", "exec alembic -c alembic.ini upgrade head"]
environment: &controller_db_env
POSTGRES_URL: postgresql+psycopg://postgres:postgres@postgres.railway.internal:5432/postgres
depends_on:
postgres:
condition: service_healthy
controller:
build:
context: .
dockerfile: controller/Dockerfile
command: ["sh", "-c", "exec uvicorn controller.api.main:app --host :: --port 8000"]
environment:
<<: *controller_db_env
DATABASE_URL: postgresql+asyncpg://postgres:postgres@postgres.railway.internal:5432/postgres
# Railway private networking uses http:// for HTTP services.
# Temporal stays host:port because the Temporal client speaks gRPC.
TEMPORAL_URL: temporal.railway.internal:7233
WORKER_URL: http://worker-light.railway.internal:8001
WORKER_LIGHT_TRANSPORT: ws
WORKER_HEAVY_URL: http://worker-heavy.railway.internal:8002
WORKER_RENDERER_URL: http://worker-renderer.railway.internal:8003
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
OPENAI_API_BASE: ${OPENAI_API_BASE:-}
IS_INTEGRATION_TEST: "false"
LOG_LEVEL: ${LOG_LEVEL:-INFO}
S3_ENDPOINT: ${ENDPOINT:-https://storage.railway.app}
S3_ENDPOINT_URL: ${ENDPOINT:-https://storage.railway.app}
S3_ACCESS_KEY: ${ACCESS_KEY_ID:-change-me}
S3_SECRET_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_ACCESS_KEY_ID: ${ACCESS_KEY_ID:-change-me}
AWS_SECRET_ACCESS_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_REGION: ${REGION:-auto}
ASSET_S3_BUCKET: ${BUCKET:-problemologist}
BACKUP_S3_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_SOURCE_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_ASSETS_BUCKET: ${BUCKET:-problemologist}
depends_on:
postgres:
condition: service_healthy
temporal:
condition: service_started
migrations:
condition: service_completed_successfully
controller-temporal-worker:
build:
context: .
dockerfile: controller/Dockerfile
command: ["sh", "-c", "exec python controller/temporal_worker.py"]
environment:
TEMPORAL_URL: temporal.railway.internal:7233
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
OPENAI_API_BASE: ${OPENAI_API_BASE:-}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
S3_ENDPOINT: ${ENDPOINT:-https://storage.railway.app}
S3_ENDPOINT_URL: ${ENDPOINT:-https://storage.railway.app}
S3_ACCESS_KEY: ${ACCESS_KEY_ID:-change-me}
S3_SECRET_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_ACCESS_KEY_ID: ${ACCESS_KEY_ID:-change-me}
AWS_SECRET_ACCESS_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_REGION: ${REGION:-auto}
ASSET_S3_BUCKET: ${BUCKET:-problemologist}
BACKUP_S3_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_SOURCE_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_ASSETS_BUCKET: ${BUCKET:-problemologist}
depends_on:
temporal:
condition: service_started
worker-light:
build:
context: .
dockerfile: worker_light/Dockerfile
command: ["sh", "-c", "exec uvicorn worker_light.app:app --host :: --port 8001"]
environment:
WORKER_TYPE: light
LOG_LEVEL: ${LOG_LEVEL:-INFO}
S3_ENDPOINT: ${ENDPOINT:-https://storage.railway.app}
S3_ENDPOINT_URL: ${ENDPOINT:-https://storage.railway.app}
S3_ACCESS_KEY: ${ACCESS_KEY_ID:-change-me}
S3_SECRET_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_ACCESS_KEY_ID: ${ACCESS_KEY_ID:-change-me}
AWS_SECRET_ACCESS_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_REGION: ${REGION:-auto}
ASSET_S3_BUCKET: ${BUCKET:-problemologist}
BACKUP_S3_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_SOURCE_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_ASSETS_BUCKET: ${BUCKET:-problemologist}
worker-heavy:
build:
context: .
dockerfile: worker_heavy/Dockerfile
command: ["sh", "-c", "exec uvicorn worker_heavy.app:app --host :: --port 8002"]
environment:
WORKER_TYPE: heavy
TEMPORAL_URL: temporal.railway.internal:7233
CONTROLLER_URL: http://controller.railway.internal:8000
WORKER_RENDERER_URL: http://worker-renderer.railway.internal:8003
LOG_LEVEL: ${LOG_LEVEL:-INFO}
LIBGL_ALWAYS_SOFTWARE: "1"
PROBLEMOLOGIST_PHYSICS_GL_BACKEND: egl
PROBLEMOLOGIST_RENDER_GL_BACKEND: osmesa
MUJOCO_GL: egl
PYOPENGL_PLATFORM: osmesa
PYVISTA_OFF_SCREEN: "true"
VTK_DEFAULT_OPENGL_WINDOW: vtkOSOpenGLRenderWindow
PYGLET_HEADLESS: "1"
S3_ENDPOINT: ${ENDPOINT:-https://storage.railway.app}
S3_ENDPOINT_URL: ${ENDPOINT:-https://storage.railway.app}
S3_ACCESS_KEY: ${ACCESS_KEY_ID:-change-me}
S3_SECRET_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_ACCESS_KEY_ID: ${ACCESS_KEY_ID:-change-me}
AWS_SECRET_ACCESS_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_REGION: ${REGION:-auto}
ASSET_S3_BUCKET: ${BUCKET:-problemologist}
BACKUP_S3_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_SOURCE_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_ASSETS_BUCKET: ${BUCKET:-problemologist}
depends_on:
temporal:
condition: service_started
worker-renderer:
condition: service_started
worker-heavy-temporal:
build:
context: .
dockerfile: worker_heavy/Dockerfile
command: ["sh", "-c", "exec python -m worker_heavy.temporal_worker"]
environment:
TEMPORAL_URL: temporal.railway.internal:7233
CONTROLLER_URL: http://controller.railway.internal:8000
WORKER_RENDERER_URL: http://worker-renderer.railway.internal:8003
LOG_LEVEL: ${LOG_LEVEL:-INFO}
S3_ENDPOINT: ${ENDPOINT:-https://storage.railway.app}
S3_ENDPOINT_URL: ${ENDPOINT:-https://storage.railway.app}
S3_ACCESS_KEY: ${ACCESS_KEY_ID:-change-me}
S3_SECRET_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_ACCESS_KEY_ID: ${ACCESS_KEY_ID:-change-me}
AWS_SECRET_ACCESS_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_REGION: ${REGION:-auto}
ASSET_S3_BUCKET: ${BUCKET:-problemologist}
BACKUP_S3_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_SOURCE_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_ASSETS_BUCKET: ${BUCKET:-problemologist}
depends_on:
temporal:
condition: service_started
worker-renderer:
condition: service_started
worker-renderer:
build:
context: .
dockerfile: worker_renderer/Dockerfile
command: ["sh", "-c", "exec uvicorn worker_renderer.app:app --host :: --port 8003"]
environment:
LOG_LEVEL: ${LOG_LEVEL:-INFO}
PROBLEMOLOGIST_PHYSICS_GL_BACKEND: egl
PROBLEMOLOGIST_RENDER_GL_BACKEND: osmesa
PYOPENGL_PLATFORM: osmesa
PYVISTA_OFF_SCREEN: "true"
VTK_DEFAULT_OPENGL_WINDOW: vtkOSOpenGLRenderWindow
PYGLET_HEADLESS: "1"
S3_ENDPOINT: ${ENDPOINT:-https://storage.railway.app}
S3_ENDPOINT_URL: ${ENDPOINT:-https://storage.railway.app}
S3_ACCESS_KEY: ${ACCESS_KEY_ID:-change-me}
S3_SECRET_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_ACCESS_KEY_ID: ${ACCESS_KEY_ID:-change-me}
AWS_SECRET_ACCESS_KEY: ${SECRET_ACCESS_KEY:-change-me}
AWS_REGION: ${REGION:-auto}
ASSET_S3_BUCKET: ${BUCKET:-problemologist}
BACKUP_S3_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_SOURCE_BUCKET: ${BUCKET:-problemologist}
BENCHMARK_ASSETS_BUCKET: ${BUCKET:-problemologist}
volumes:
postgres_railway_data: