-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
163 lines (145 loc) · 5.76 KB
/
docker-compose.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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
version: "2.4"
networks:
default:
driver: bridge
enable_ipv6: true
ipam:
driver: default
config:
- subnet: 172.19.0.0/24
gateway: 172.19.0.1
- subnet: fd15:555::/64
gateway: fd15:555::1
services:
reverse-proxy:
image: traefik:v2.3
restart: unless-stopped
command:
- --providers.docker
- --entryPoints.web.address=:80
#- --entrypoints.web.http.redirections.entryPoint.to=websecure
#- --entrypoints.web.http.redirections.entryPoint.scheme=https
#- --entrypoints.web.http.redirections.entrypoint.permanent=true
- --entryPoints.websecure.address=:443
- --certificatesresolvers.letsencrypt.acme.tlschallenge=true
- --certificatesresolvers.letsencrypt.acme.email=$ACME_EMAIL
- --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
#- --api.insecure=true
ports:
- "80:80"
- "443:443"
# - "8080:8080"
depends_on:
- back
- front
- maps
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./ssl/:/letsencrypt/
front:
image: nginx:alpine
restart: unless-stopped
volumes:
- ./workadventure/front/dist:/usr/share/nginx/html
- ./front/dist/resources:/usr/share/nginx/html/resources
- ./front/dist/static:/usr/share/nginx/html/static
- ./workadventure/front/nginx-vhost.conf:/etc/nginx/conf.d/default.conf
labels:
# Forward HTTP to HTTPs
- "traefik.http.middlewares.front-https.redirectscheme.scheme=https"
- "traefik.http.routers.front.rule=Host(`play.${BASE_DOMAIN}`)"
- "traefik.http.routers.front.entryPoints=web"
- "traefik.http.routers.front.middlewares=front-https"
- "traefik.http.services.front.loadbalancer.server.port=8000"
- "traefik.http.routers.front-ssl.rule=Host(`play.${BASE_DOMAIN}`)"
- "traefik.http.routers.front-ssl.entryPoints=websecure"
- "traefik.http.routers.front-ssl.tls=true"
- "traefik.http.routers.front-ssl.tls.certresolver=letsencrypt"
- "traefik.http.routers.front-ssl.service=front"
# - "traefik.http.routers.front.middlewares=auth"
# - "traefik.http.middlewares.auth.basicauth.users=$TRAEFIK_BASICAUTH"
back:
image: thecodingmachine/nodejs:12
restart: unless-stopped
command: yarn dev
#command: yarn run profile
environment:
DEBUG: "*"
STARTUP_COMMAND_1: yarn install
SECRET_KEY: yourSecretKey
SECRET_JITSI_KEY: "$SECRET_JITSI_KEY"
ALLOW_ARTILLERY: "true"
ADMIN_API_URL: "$ADMIN_API_URL"
ADMIN_API_TOKEN: "$ADMIN_API_TOKEN"
JITSI_URL: $JITSI_URL
JITSI_ISS: $JITSI_ISS
MAX_PER_GROUP: $MAX_PER_GROUP
volumes:
- ./workadventure/back:/usr/src/app
labels:
- "traefik.enable=false"
pusher:
image: thecodingmachine/nodejs:12
restart: unless-stopped
command: yarn dev
#command: yarn run prod
#command: yarn run profile
environment:
DEBUG: "*"
STARTUP_COMMAND_1: yarn install
SECRET_KEY: yourSecretKey
SECRET_JITSI_KEY: "$SECRET_JITSI_KEY"
ADMIN_API_URL: "$ADMIN_API_URL"
ADMIN_API_TOKEN: "$ADMIN_API_TOKEN"
API_URL: back:50051
JITSI_URL: $JITSI_URL
JITSI_ISS: $JITSI_ISS
volumes:
- ./workadventure/pusher:/usr/src/app
labels:
- "traefik.http.routers.pusher.rule=Host(`pusher.${BASE_DOMAIN}`)"
- "traefik.http.routers.pusher.entryPoints=web"
- "traefik.http.services.pusher.loadbalancer.server.port=8080"
- "traefik.http.routers.pusher-ssl.rule=Host(`pusher.${BASE_DOMAIN}`)"
- "traefik.http.routers.pusher-ssl.entryPoints=websecure"
- "traefik.http.routers.pusher-ssl.tls=true"
- "traefik.http.routers.pusher-ssl.service=pusher"
- "traefik.http.routers.pusher-ssl.tls.certresolver=letsencrypt"
maps:
image: nginx:alpine
volumes:
- ../cybercamp-maps:/usr/share/nginx/html
- ./cybercamp-maps.conf:/etc/nginx/conf.d/default.conf
labels:
# Forward HTTP to HTTPS
- "traefik.http.middlewares.maps-https.redirectscheme.scheme=https"
- "traefik.http.routers.maps.rule=Host(`maps.${BASE_DOMAIN}`)"
- "traefik.http.routers.maps.entryPoints=web"
- "traefik.http.routers.maps.middlewares=maps-https"
# Serve maps via HTTPS, add CORS headers and gzip compression
- "traefik.http.middlewares.maps-cors.headers.accesscontrolalloworigin=*"
- "traefik.http.middlewares.maps-compress.compress=true"
- "traefik.http.services.maps-ssl.loadbalancer.server.port=80"
- "traefik.http.routers.maps-ssl.rule=Host(`maps.${BASE_DOMAIN}`)"
- "traefik.http.routers.maps-ssl.entryPoints=websecure"
- "traefik.http.routers.maps-ssl.tls=true"
- "traefik.http.routers.maps-ssl.tls.certresolver=letsencrypt"
- "traefik.http.routers.maps-ssl.middlewares=maps-cors,maps-compress"
website:
image: nginx:alpine
volumes:
- ./website:/usr/share/nginx/html
labels:
# Forward HTTP to HTTPS
- "traefik.http.middlewares.website-https.redirectscheme.scheme=https"
- "traefik.http.routers.website.rule=Host(`${BASE_DOMAIN}`)"
- "traefik.http.routers.website.entryPoints=web"
- "traefik.http.routers.website.middlewares=website-https"
# Serve website via HTTPS and gzip compression
- "traefik.http.middlewares.website-compress.compress=true"
- "traefik.http.services.website-ssl.loadbalancer.server.port=80"
- "traefik.http.routers.website-ssl.rule=Host(`${BASE_DOMAIN}`)"
- "traefik.http.routers.website-ssl.entryPoints=websecure"
- "traefik.http.routers.website-ssl.tls=true"
- "traefik.http.routers.website-ssl.tls.certresolver=letsencrypt"
- "traefik.http.routers.website-ssl.middlewares=website-compress"