forked from codepod-io/codepod
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
110 lines (98 loc) · 2.96 KB
/
compose.yml
File metadata and controls
110 lines (98 loc) · 2.96 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
# Use postgres/example user/password credentials
version: "3.5"
services:
db:
image: postgres
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- db-data:/var/lib/postgresql/data
prisma:
image: node:18
restart: always
command: sh -c "yarn && yarn run prisma studio"
working_dir: /app
volumes:
- ../../api:/app
- prisma-node-modules:/app/node_modules
environment:
DATABASE_URL: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?schema=public"
api:
image: node:18
working_dir: /app
volumes:
- ../../api:/app
- api-node-modules:/app/node_modules
- /var/run/docker.sock:/var/run/docker.sock
command: sh -c "yarn && yarn dev"
environment:
DATABASE_URL: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?schema=public"
JWT_SECRET: ${JWT_SECRET}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
KERNEL_NETWORK: "codepod"
EXPORT_AWS_S3_REGION: ${EXPORT_AWS_S3_REGION}
EXPORT_AWS_S3_BUCKET: ${EXPORT_AWS_S3_BUCKET}
EXPORT_AWS_S3_ACCESS_KEY_ID: ${EXPORT_AWS_S3_ACCESS_KEY_ID}
EXPORT_AWS_S3_SECRET_ACCESS_KEY: ${EXPORT_AWS_S3_SECRET_ACCESS_KEY}
PROXY_API_URL: "http://proxy:4011/graphql"
ZMQ_KERNEL_IMAGE: "lihebi/codepod-kernel-python:latest"
WS_RUNTIME_IMAGE: "lihebi/codepod-runtime:latest"
# 1000 * 60 * 3: 3 minutes
# KERNEL_TTL: "180000"
# 1000 * 60 * 60 * 12: 12 hours
KERNEL_TTL: "43200000"
# 1000 * 5: 5 seconds
# LOOP_INTERVAL: "5000"
# 1000 * 60 * 1: 1 minute
LOOP_INTERVAL: "60000"
ui:
image: node:18
working_dir: /app
ports:
# For react hot-reloading in development.
- 3000:3000
environment:
REACT_APP_GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
REACT_APP_CODEIUM_API_KEY: ${CODEIUM_API_KEY}
volumes:
- ../../ui:/app
- ui-node-modules:/app/node_modules
command: sh -c "yarn && yarn run generate && yarn dev"
proxy:
image: node:18
working_dir: /app
volumes:
- ../../proxy:/app
- proxy-node-modules:/app/node_modules
command: sh -c "yarn && yarn dev"
nginx:
image: nginx:alpine
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
socket:
image: node:18
working_dir: /app
volumes:
- socket-node-modules:/app/node_modules
command: sh -c "yarn add yjs y-websocket && HOST=0.0.0.0 PORT=4233 npx y-websocket"
example-runtime:
# TODO Verify the latest image will be downloaded for each new release.
image: lihebi/codepod-runtime:latest
example-kernel:
image: lihebi/codepod-kernel-python:latest
volumes:
db-data:
api-node-modules:
ui-node-modules:
proxy-node-modules:
prisma-node-modules:
socket-node-modules:
networks:
default:
name: codepod
driver: bridge