forked from judge0/judge0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.https.yml
84 lines (76 loc) · 1.9 KB
/
docker-compose.https.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
version: "2"
x-logging:
&default-logging
logging:
driver: json-file
options:
max-size: 100M
services:
nginx:
image: judge0/nginxproxy-nginx-proxy:latest-2021-04-26
environment:
HTTPS_METHOD: noredirect
volumes:
- ./srv/nginx/certs:/etc/nginx/certs:ro
- ./srv/nginx/conf.d:/etc/nginx/conf.d
- ./srv/nginx/dhparam:/etc/nginx/dhparam
- ./srv/nginx/html:/usr/share/nginx/html
- ./srv/nginx/htpasswd:/etc/nginx/htpasswd
- ./srv/nginx/vhost.d:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- "80:80"
- "443:443"
<<: *default-logging
restart: always
acme:
image: judge0/nginxproxy-acme-companion:2.1.0
environment:
DEFAULT_EMAIL: [email protected]
volumes:
- ./srv/acme/acme.sh:/etc/acme.sh
- ./srv/nginx/certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes_from:
- nginx
<<: *default-logging
restart: always
server:
image: judge0/judge0:latest
environment:
- VIRTUAL_HOST=subdomain.yourdomain.tld
- LETSENCRYPT_HOST=subdomain.yourdomain.tld
volumes:
- ./judge0.conf:/judge0.conf:ro
privileged: true
<<: *default-logging
restart: always
worker:
image: judge0/judge0:latest
command: ["./scripts/workers"]
volumes:
- ./judge0.conf:/judge0.conf:ro
privileged: true
<<: *default-logging
restart: always
db:
image: postgres:13.0
env_file: judge0.conf
volumes:
- postgres-data:/var/lib/postgresql/data/
<<: *default-logging
restart: always
redis:
image: redis:6.0
command: [
"bash", "-c",
'docker-entrypoint.sh --appendonly yes --requirepass "$$REDIS_PASSWORD"'
]
env_file: judge0.conf
volumes:
- redis-data:/data
<<: *default-logging
restart: always
volumes:
postgres-data:
redis-data: