-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.yml
53 lines (49 loc) · 2.06 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
version: "3.3"
services:
traefik:
image: "traefik:latest"
command:
- "--providers.docker"
- "--providers.file.directory=/etc/traefik/dynamic_conf"
- "--entrypoints.http.address=:80"
- "--entrypoints.https.address=:443"
- "--providers.docker.exposedByDefault=false"
- "--certificatesResolvers.le.acme.storage=/etc/certstore/acme.json"
- "--certificatesResolvers.le.acme.httpChallenge.entryPoint=http"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./traefik/config:/etc/traefik/dynamic_conf"
- "./traefik/certstore:/etc/certstore"
restart: "on-failure"
ranna:
image: "ghcr.io/ranna-go/ranna:latest"
environment:
HOSTROOTDIR: "/var/opt/ranna"
API.MAXOUTPUTLEN: "1M"
SANDBOX.MEMORY: "50M"
SANDBOX.TIMEOUTSECONDS: "20"
SANDBOX.STREAMBUFFERCAP: "1M"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/var/opt/ranna:/var/opt/ranna"
expose:
- "8080"
restart: "on-failure"
labels:
traefik.enable: "true"
traefik.http.routers.ranna.entrypoints: "https"
traefik.http.routers.ranna.tls: "true"
traefik.http.routers.ranna.tls.certresolver: "le"
traefik.http.routers.ranna.rule: "Host(`example.com`)"
traefik.http.routers.ranna-limited.entrypoints: "https"
traefik.http.routers.ranna-limited.tls: "true"
traefik.http.routers.ranna-limited.tls.certresolver: "le"
traefik.http.routers.ranna-limited.rule: "Host(`example.com`) && PathPrefix(`/v1/exec`)"
traefik.http.routers.ranna-limited.middlewares: "ranna-rl"
traefik.http.middlewares.ranna-rl.ratelimit.average: "5"
traefik.http.middlewares.ranna-rl.ratelimit.period: "1m"
traefik.http.middlewares.ranna-rl.ratelimit.burst: "5"