-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
59 lines (55 loc) · 1.96 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
version: '3'
services:
theia:
build: ./theia
volumes:
- ./theia/plugins:/plugins
- ./workspace-theia:/home/project:cached
environment:
- THEIA_WEBVIEW_EXTERNAL_ENDPOINT={{hostname}}
command:
- "--plugins=local-dir:/plugins"
restart: unless-stopped
nginx:
image: nginx:1.17.1-alpine
ports:
- 80:80
- 443:443
environment:
- NGINX_HOST=${HOSTNAME}
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/general.conf:/etc/nginx/general.conf:ro
- ./nginx/security.conf:/etc/nginx/security.conf:ro
- ./nginx/letsencrypt.conf:/etc/nginx/letsencrypt.conf:ro
- ./nginx/proxy.conf:/etc/nginx/proxy.conf:ro
- ./nginx/theia.template:/etc/nginx/theia.template:ro
- ./nginx/sites-enabled:/etc/nginx/sites-enabled
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
command: /bin/sh -c "envsubst '$${NGINX_HOST}' < /etc/nginx/theia.template > /etc/nginx/sites-enabled/${HOSTNAME}.conf && while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\""
depends_on:
- oauth
- certbot
restart: unless-stopped
certbot:
image: certbot/certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
restart: unless-stopped
oauth:
image: quay.io/pusher/oauth2_proxy
command:
- "-provider=azure"
- "-azure-tenant=${OAUTH2_PROXY_AZURE_TENANT}"
- "-email-domain=*"
- "-redirect-url=https://${HOSTNAME}/oauth2/callback"
- "-http-address=0.0.0.0:4180"
- "-skip-provider-button"
environment:
- OAUTH2_PROXY_CLIENT_ID=${OAUTH2_PROXY_CLIENT_ID}
- OAUTH2_PROXY_CLIENT_SECRET=${OAUTH2_PROXY_CLIENT_SECRET}
- OAUTH2_PROXY_COOKIE_SECRET=${OAUTH2_PROXY_COOKIE_SECRET}
restart: unless-stopped