-
Notifications
You must be signed in to change notification settings - Fork 1
/
stack-workspace.yml
72 lines (58 loc) · 1.63 KB
/
stack-workspace.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
version: '3.8'
services:
workspace:
image: nonfiction/workspace:latest
hostname: <%= $(bin/get swarm) %>
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
# resources:
# limits:
# cpus: '0.9'
# memory: 1000M
restart_policy:
condition: on-failure
labels:
traefik.enable: "true"
traefik.docker.network: "proxy"
traefik.http.routers.workspace.entrypoints: "websecure"
traefik.http.routers.workspace.rule: "Host(`workspace.<%= $(bin/get swarm) -%>`)"
traefik.http.routers.workspace.tls.certresolver: "resolver-dns"
traefik.http.routers.workspace.tls.domains[0].main: "<%= $(bin/get swarm) -%>"
traefik.http.routers.workspace.tls.domains[0].sans: "*.<%= $(bin/get swarm) -%>"
traefik.http.services.workspace.loadbalancer.server.port: "8443"
traefik.http.services.workspace.loadbalancer.server.scheme: "https"
volumes:
- /work:/work
- /data:/data
- /mnt/<%= $(bin/get swarm) | tr . _ -%>/snapshots:/snapshots
- /root:/root
- share:/usr/local/share
- cache:/usr/local/cache
- doctl:/usr/local/config/doctl
- /usr/local/env:/usr/local/env
- /var/run/docker.sock:/var/run/docker.sock
networks:
- proxy
ports:
- target: 2222
published: 2222
mode: host
logging:
options:
max-size: "1m"
volumes:
share:
cache:
doctl:
networks:
proxy:
name: proxy
driver: overlay
external: true
db:
name: db
driver: overlay
external: true