-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
96 lines (92 loc) · 3.24 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
version: "3"
services:
front:
image: thecodingmachine/nodejs:14
environment:
DEBUG_MODE: 0
JITSI_URL: jitsi.live.datenspuren.de
HOST: "0.0.0.0"
NODE_ENV: development
API_URL: api.workadventure.live.datenspuren.de
STARTUP_COMMAND_1: yarn install
networks:
- traefik
command: webpack-dev-server --config webpack.prod.js --no-inline
#command: yarn run start
volumes:
- ./front:/usr/src/app
labels:
- "traefik.docker.network=traefik"
- "traefik.http.services.front.loadbalancer.server.port=8080"
- "traefik.http.routers.front.rule=Host(`play.workadventure.live.datenspuren.de`)"
- "traefik.http.routers.front.entryPoints=websecure"
- "traefik.http.routers.front.tls=true"
- "traefik.http.routers.front.tls.certresolver=le"
- "traefik.http.routers.front.service=front"
maps:
image: thecodingmachine/nodejs:12-apache
environment:
DEBUG_MODE: 0
HOST: "0.0.0.0"
NODE_ENV: development
#APACHE_DOCUMENT_ROOT: dist/
#APACHE_EXTENSIONS: headers
#APACHE_EXTENSION_HEADERS: 1
STARTUP_COMMAND_0: sudo a2enmod headers
STARTUP_COMMAND_1: yarn install
STARTUP_COMMAND_2: yarn run dev &
networks:
- traefik
volumes:
- ./maps:/var/www/html
labels:
- "traefik.docker.network=traefik"
- "traefik.http.services.maps.loadbalancer.server.port=80"
- "traefik.http.routers.maps.rule=Host(`maps.workadventure.live.datenspuren.de`)"
- "traefik.http.routers.maps.entryPoints=websecure"
- "traefik.http.routers.maps.tls=true"
- "traefik.http.routers.maps.tls.certresolver=le"
- "traefik.http.routers.maps.service=maps"
back:
image: thecodingmachine/nodejs:12
build: back/
networks:
- traefik
#command: yarn dev
command: node ./dist/server.js
# environment:
# SECRET_KEY: ... see .env
volumes:
- ./back:/usr/src/app
labels:
- "traefik.docker.network=traefik"
- "traefik.http.services.back.loadbalancer.server.port=8080"
- "traefik.http.routers.back.rule=Host(`api.workadventure.live.datenspuren.de`)"
- "traefik.http.routers.back.entryPoints=websecure"
- "traefik.http.routers.back.tls=true"
- "traefik.http.routers.back.tls.certresolver=le"
- "traefik.http.routers.back.service=back"
- "traefik.http.routers.back.middlewares=api"
- "traefik.http.middlewares.api.headers.customResponseHeaders.Access-Control-Allow-Origin=https://play.workadventure.live.datenspuren.de"
website:
image: thecodingmachine/nodejs:12-apache
environment:
STARTUP_COMMAND_2: npm run watch &
APACHE_DOCUMENT_ROOT: dist/
networks:
- traefik
ports:
- "9080:80"
volumes:
- ./website:/var/www/html
labels:
- "traefik.docker.network=traefik"
- "traefik.http.services.website.loadbalancer.server.port=80"
- "traefik.http.routers.website.rule=Host(`workadventure.live.datenspuren.de`)"
- "traefik.http.routers.website.entryPoints=websecure"
- "traefik.http.routers.website.tls=true"
- "traefik.http.routers.website.tls.certresolver=le"
- "traefik.http.routers.website.service=website"
networks:
traefik:
external: true