-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcode-server.nginx.yaml
78 lines (74 loc) · 1.95 KB
/
code-server.nginx.yaml
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
# ----------------
# Code Server + Nginx Reverse Proxy
# Base Tag: linuxserver/code-server:amd64-latest
# Docs: https://hub.docker.com/r/linuxserver/code-server
# ----------------
version: "3.7"
services:
proxy:
image: jwilder/nginx-proxy
container_name: code.proxy
env_file: .env
ports:
- ${VIRTUAL_PORT}:443
networks:
- code_server
volumes:
- ./certs:/etc/nginx/certs:ro
- ./vhostd:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 25
window: 15s
code:
build:
context: .
args:
- DOCKER_HOST_GID=${DOCKER_HOST_GID}
- DEFAULT_USER=${DEFAULT_USER}
image: code.server.sdk
container_name: code.server
privileged: false
env_file: .env
command: code-server --disable-telemetry
expose:
- 8443
ports:
- "5000-5010:5000-5010"
- "8000-8010:8000-8010"
networks:
- code_server
volumes:
- ${HOST_CODE_PATH}:${CODE_PATH}:z
- ${HOST_CONFIG_PATH}:/home/coder/.config
- ${HOST_CONFIG_PATH}:/config/.config
- ${HOST_CONFIG_PATH}/data:/config/data
- ${HOST_CONFIG_PATH}/workspace:/config/workspace
- ${HOST_CONFIG_PATH}/extensions:/config/extensions
- ${HOST_CONFIG_PATH}/extensions:/config/.local/share/code-server/extensions
- ${HOST_LOG_PATH}:/config/.local/share/code-server/coder-logs
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- proxy
deploy:
resources:
limits:
cpus: '8'
memory: 32G
restart_policy:
condition: on-failure
delay: 15s
max_attempts: 5
window: 60s
networks:
code_server:
driver: bridge