-
Notifications
You must be signed in to change notification settings - Fork 81
/
docker-compose.yaml
227 lines (215 loc) · 6.75 KB
/
docker-compose.yaml
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
services:
server:
hostname: server
restart: always
container_name: server
entrypoint: [ "/startup.sh" ]
build:
context: .
dockerfile: Dockerfile
target: server-development
environment:
AI_DEVELOPER_DB_HOST: pg
AI_DEVELOPER_DB_USER: postgres
AI_DEVELOPER_DB_PASSWORD: postgres
AI_DEVELOPER_REDIS_HOST: redis
AI_DEVELOPER_REDIS_PORT: 6379
AI_DEVELOPER_REDIS_DB: 0
AI_DEVELOPER_GITNESS_TOKEN: ${AI_DEVELOPER_GITNESS_TOKEN:-}
AI_DEVELOPER_GITNESS_URL: ${AI_DEVELOPER_GITNESS_URL:-http://gitness:3000}
AI_DEVELOPER_GITNESS_USER: ${AI_DEVELOPER_GITNESS_USER:-admin}
AI_DEVELOPER_GITNESS_HOST: ${AI_DEVELOPER_GITNESS_HOST:-gitness:3000}
AI_DEVELOPER_GITNESS_PASSWORD: ${GITNESS_PRINCIPAL_ADMIN_PASSWORD:-admin}
AI_DEVELOPER_WORKSPACE_SERVICE_ENDPOINT: ${AI_DEVELOPER_WORKSPACE_SERVICE_ENDPOINT:-http://ws:8080}
AI_DEVELOPER_APP_URL: ${AI_DEVELOPER_APP_URL:-http://localhost:3000}
AI_DEVELOPER_GITHUB_CLIENT_SECRET: ${AI_DEVELOPER_GITHUB_CLIENT_SECRET:-}
AI_DEVELOPER_GITHUB_CLIENT_ID: ${AI_DEVELOPER_GITHUB_CLIENT_ID:-}
NEW_RELIC_ENABLED: false
AI_DEVELOPER_AWS_ACCESS_KEY_ID: ${AI_DEVELOPER_AWS_ACCESS_KEY_ID}
AI_DEVELOPER_AWS_SECRET_ACCESS_KEY: ${AI_DEVELOPER_AWS_SECRET_ACCESS_KEY}
AI_DEVELOPER_AWS_REGION: ${AI_DEVELOPER_AWS_REGION}
AI_DEVELOPER_WORKSPACE_STATIC_FRONTEND_URL: "http://localhost:8083"
AI_DEVELOPER_FILESTORE_TYPE: ${AI_DEVELOPER_FILESTORE_TYPE:-local}
AI_DEVELOPER_FILESTORE_S3_BUCKET: ${AI_DEVELOPER_FILESTORE_S3_BUCKET}
volumes:
- workspaces:/workspaces
- filestore:/filestore
- './startup.sh:/startup.sh'
depends_on:
- pg
- redis
- worker
ports:
- 8080:8080
worker:
hostname: worker
restart: always
container_name: worker
entrypoint: [ "/startup-worker.sh" ]
build:
context: .
dockerfile: Dockerfile
target: worker-development
environment:
AI_DEVELOPER_DB_HOST: pg
AI_DEVELOPER_DB_USER: postgres
AI_DEVELOPER_DB_PASSWORD: postgres
AI_DEVELOPER_REDIS_HOST: redis
AI_DEVELOPER_REDIS_PORT: 6379
AI_DEVELOPER_REDIS_DB: 0
AI_DEVELOPER_GITNESS_TOKEN: ${AI_DEVELOPER_GITNESS_TOKEN:-}
AI_DEVELOPER_GITNESS_URL: ${AI_DEVELOPER_GITNESS_URL:-http://gitness:3000}
AI_DEVELOPER_GITNESS_USER: ${AI_DEVELOPER_GITNESS_USER:-admin}
AI_DEVELOPER_GITNESS_PASSWORD: ${GITNESS_PRINCIPAL_ADMIN_PASSWORD:-admin}
AI_DEVELOPER_GITNESS_HOST: ${AI_DEVELOPER_GITNESS_HOST:-gitness:3000}
AI_DEVELOPER_WORKSPACE_WORKING_DIR: ${AI_DEVELOPER_WORKSPACE_WORKING_DIR:-/workspaces}
AI_DEVELOPER_WORKSPACE_TEMPLATE_DIR: ${AI_DEVELOPER_WORKSPACE_TEMPLATE_DIR:-}
AI_DEVELOPER_WORKSPACE_SERVICE_ENDPOINT: ${AI_DEVELOPER_WORKSPACE_SERVICE_ENDPOINT:-http://ws:8080}
AI_DEVELOPER_APP_URL: ${AI_DEVELOPER_APP_URL:-http://localhost:3000}
AI_DEVELOPER_GITHUB_CLIENT_SECRET: ${AI_DEVELOPER_GITHUB_CLIENT_SECRET:-}
AI_DEVELOPER_GITHUB_CLIENT_ID: ${AI_DEVELOPER_GITHUB_CLIENT_ID:-}
NEW_RELIC_ENABLED: false
AI_DEVELOPER_AWS_ACCESS_KEY_ID: ${AI_DEVELOPER_AWS_ACCESS_KEY_ID}
AI_DEVELOPER_AWS_SECRET_ACCESS_KEY: ${AI_DEVELOPER_AWS_SECRET_ACCESS_KEY}
AI_DEVELOPER_AWS_REGION: ${AI_DEVELOPER_AWS_REGION}
AI_DEVELOPER_WORKSPACE_STATIC_FRONTEND_URL: "http://localhost:8083"
AI_DEVELOPER_FILESTORE_TYPE: ${AI_DEVELOPER_FILESTORE_TYPE:-local}
AI_DEVELOPER_FILESTORE_S3_BUCKET: ${AI_DEVELOPER_FILESTORE_S3_BUCKET}
volumes:
- workspaces:/workspaces
- filestore:/filestore
- './startup-worker.sh:/startup-worker.sh'
migrations:
hostname: migrations
container_name: migrations
depends_on:
- pg
build:
context: .
dockerfile: Dockerfile
target: migrations
environment:
AI_DEVELOPER_DB_HOST: pg
AI_DEVELOPER_DB_USER: postgres
AI_DEVELOPER_DB_PASSWORD: postgres
AI_DEVELOPER_ENV: development
volumes:
- workspaces:/workspaces
python-executor:
restart: no
hostname: python-executor
container_name: python-executor
image: python-executor:latest
build:
context: .
dockerfile: Dockerfile
target: python-executor
node-executor:
restart: no
hostname: node-executor
container_name: node-executor
image: node-executor:latest
build:
context: .
dockerfile: Dockerfile
target: node-executor
ws:
hostname: ws
restart: always
container_name: ws
build:
context: ./workspace-service
dockerfile: Dockerfile
target: development
environment:
WORKSPACES_GITNESS_USER: ${WORKSPACES_GITNESS_USER:-}
WORKSPACES_GITNESS_TOKEN: ${WORKSPACES_GITNESS_TOKEN:-}
NEW_RELIC_ENABLED: false
volumes:
- workspaces:/workspaces
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 8082:8080
pg:
hostname: pg
restart: always
container_name: pg
image: "postgres:16.3-alpine3.20"
volumes:
- pg_data:/var/lib/postgresql/data/
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "ai-developer"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
nginx:
hostname: nginx
restart: always
container_name: nginx
image: "nginx:1.27.0-alpine3.19-slim"
ports:
- "8083:80"
volumes:
- workspaces:/workspaces
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- server
- frontend
redis:
hostname: redis
restart: always
container_name: redis
image: "redis:7.2-alpine"
volumes:
- redis_data:/data
python-ide:
image: superagidev/supercoder-python-ide:latest
container_name: supercoder-python-ide
hostname: supercoder-python-ide
restart: always
working_dir: /workspaces
ports:
- 8081:8080
- 5000:5000
volumes:
- workspaces:/workspaces
frontend:
container_name: frontend
build:
context: ./gui
dockerfile: Dockerfile
ports:
- 3000:3000
volumes:
- ./gui:/app
- /app/node_modules/
- /app/.next/
depends_on:
- server
environment:
- NEXT_PUBLIC_DOCKER=true
restart: always
command: [ "yarn", "dev" ]
gitness:
container_name: gitness
image: harness/gitness
volumes:
- gitness:/data
restart: always
environment:
- GITNESS_PRINCIPAL_ADMIN_PASSWORD=${GITNESS_PRINCIPAL_ADMIN_PASSWORD:-admin}
- GITNESS_PRINCIPAL_ADMIN_EMAIL=${GITNESS_PRINCIPAL_ADMIN_USER:-admin}
ports:
- 8085:3000
volumes:
pg_data:
redis_data:
workspaces:
gitness:
filestore: