forked from demyxsh/code-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
104 lines (104 loc) · 3.99 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
# Demyx
# https://demyx.sh
#
# This docker-compose.yml is designed for VPS use with SSL/TLS first.
# Traefik requires no additional configurations and is ready to go.
# Be sure to change all the domain.tld domains and credentials before running docker-compose up -d.
#
networks:
demyx:
name: demyx
demyx_socket:
name: demyx_socket
services:
demyx_socket:
container_name: demyx_socket
environment:
- CONTAINERS=1
image: demyx/docker-socket-proxy
networks:
- demyx_socket
# Uncomment below if your host OS is CentOS/RHEL/Fedora
#privileged: true
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
demyx_traefik:
container_name: demyx_traefik
depends_on:
- demyx_socket
environment:
# Uncomment below for Cloudflare DNS challenge
#- CF_API_KEY=123456
- DEMYX_TRAEFIK_LOG=INFO
- TRAEFIK_PROVIDERS_DOCKER_ENDPOINT=tcp://demyx_socket:2375
image: demyx/traefik
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.demyx-traefik-auth.basicauth.users=demyx:$$apr1$$L91z3CIR$$m/BKZcnQGBP.Uo2cJm8I0/" # Basic auth password: demyx
- "traefik.http.middlewares.demyx-traefik-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.demyx-traefik-http.entrypoints=http"
- "traefik.http.routers.demyx-traefik-http.middlewares=demyx-traefik-redirect"
- "traefik.http.routers.demyx-traefik-http.rule=Host(`traefik.domain.tld`)"
- "traefik.http.routers.demyx-traefik-http.service=demyx-traefik-http-port"
- "traefik.http.routers.demyx-traefik-https.entrypoints=https"
- "traefik.http.routers.demyx-traefik-https.middlewares=demyx-traefik-auth"
- "traefik.http.routers.demyx-traefik-https.rule=Host(`traefik.domain.tld`)" # Traefik dashboard https://traefik.domain.tld
- "traefik.http.routers.demyx-traefik-https.service=api@internal"
- "traefik.http.routers.demyx-traefik-https.service=demyx-traefik-https-port"
- "traefik.http.routers.demyx-traefik-https.tls.certresolver=demyx"
- "traefik.http.services.demyx-traefik-http-port.loadbalancer.server.port=8080"
- "traefik.http.services.demyx-traefik-https-port.loadbalancer.server.port=8080"
networks:
- demyx
- demyx_socket
ports:
- 80:8081
- 443:8082
restart: unless-stopped
volumes:
- demyx_log:/var/log/demyx
- demyx_traefik:/demyx
demyx_code:
container_name: demyx_code
depends_on:
- demyx_traefik
environment:
- DEMYX=/demyx
- DEMYX_CODE_AUTH=password
- DEMYX_CODE_BIND_ADDR=0.0.0.0:8080
- DEMYX_CODE_CONFIG=/home/demyx/.config/code-server
- DEMYX_CODE_PASSWORD=demyx
- DEMYX_CONFIG=/etc/demyx
- DEMYX_LOG=/var/log/demyx
- TZ=America/Los_Angeles
hostname: code-server
image: demyx/code-server
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.demyx-code-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.demyx-code-http.entrypoints=http"
- "traefik.http.routers.demyx-code-http.middlewares=demyx-code-redirect"
- "traefik.http.routers.demyx-code-http.rule=Host(`domain.tld`)"
- "traefik.http.routers.demyx-code-http.service=demyx-code-http-port"
- "traefik.http.routers.demyx-code-https.entrypoints=https"
- "traefik.http.routers.demyx-code-https.rule=Host(`domain.tld`)"
- "traefik.http.routers.demyx-code-https.service=demyx-code-https-port"
- "traefik.http.routers.demyx-code-https.tls.certresolver=demyx"
- "traefik.http.services.demyx-code-http-port.loadbalancer.server.port=8080"
- "traefik.http.services.demyx-code-https-port.loadbalancer.server.port=8080"
networks:
- demyx
restart: unless-stopped
volumes:
- demyx_code:/home/demyx
version: "2.4"
volumes:
demyx_code:
name: demyx_code
demyx_log:
name: demyx_log
demyx_traefik:
name: demyx_traefik