-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
144 lines (136 loc) · 2.84 KB
/
docker-compose.yml
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
version: '3.7'
services:
api:
build:
context: .
target: base
image: classbox-base:latest
container_name: "classbox-api"
restart: unless-stopped
networks:
- web
- default
ports:
- "8080:8080"
expose:
- "8080"
environment:
- ADDR=0.0.0.0:8080
- ENV_TYPE
- DB_HOST
- DB_USER
- DB_OPTS
- GITHUB_OAUTH_CLIENT_ID
- GITHUB_OAUTH_CLIENT_SECRET
- GITHUB_APP_ID
- GITHUB_APP_CLIENT_ID
- GITHUB_APP_CLIENT_SECRET
- GITHUB_APP_NAME
- GITHUB_APP_HOOK_SECRET
- GITHUB_APP_PRIVATE_KEY
- AWS_REGION
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_S3_BUCKET
- WEB_URL
- JWT_PUBLIC_KEY
- SENTRY_DSN
- DEADLINE
depends_on:
- db
command: ["/srv/app", "api"]
web:
build:
context: .
target: base
image: classbox-base:latest
container_name: "classbox-web"
restart: unless-stopped
networks:
- web
- default
ports:
- "8082:8082"
expose:
- "8082"
environment:
- ADDR=0.0.0.0:8082
- API_URL=http://api:8080
- ENV_TYPE
- DOCS_URL
- WEB_URL
- SENTRY_DSN
depends_on:
- api
command: ["/srv/app", "web"]
tunnel:
image: mkznts/tunnel:0.1
container_name: "classbox-tunnel"
restart: unless-stopped
depends_on:
- api
environment:
- TUNNEL_URL
- TUNNEL_TARGET=http://api:8080/tasks/enqueue
runner:
build:
context: .
target: runner
image: classbox-runner:latest
container_name: "classbox-runner"
restart: unless-stopped
networks:
- default
environment:
- DOCKER_HOST=unix:///var/run/docker.sock
- DATA_DIR=/srv/data
- API_URL=http://api:8080
- ENV_TYPE
- JWT_PRIVATE_KEY
- DOCS_URL
- WEB_URL
- SENTRY_DSN
- DOCKER_PULL
- DOCKER_BUILDER_IMAGE
- DOCKER_RUNNER_IMAGE
- DOCKER_LOGIN
- DOCKER_REPO_USERNAME
- DOCKER_REPO_PASSWORD
- DOCKER_REPO_HOST
depends_on:
- api
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- classbox-data:/srv/data
command: ["/srv/app", "runner"]
db:
image: mkznts/base-postgres:0.3
container_name: "classbox-db"
volumes:
- classbox-db:/var/lib/postgresql/data
- ./sql:/sql
environment:
- PGUSER=${DB_USER} # override default user for promptless `psql`
networks:
- default
docs:
image: nginx:1.17.8
container_name: "classbox-docs"
volumes:
- classbox-docs:/usr/share/nginx/html
ports:
- "8081:80"
expose:
- "8081"
networks:
- web
networks:
web:
external: true
volumes:
classbox-db:
external: true
classbox-docs:
external: true
classbox-data:
external: true