-
Notifications
You must be signed in to change notification settings - Fork 320
/
docker-compose.prod.yml
58 lines (57 loc) · 1.4 KB
/
docker-compose.prod.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
#
# NOTE: You probably don't want to start this directly.
# Use prod-up.sh to start NUSMods in production.
#
version: '3.7'
services:
website:
build:
context: .
dockerfile: website/Dockerfile.prod
args:
- GIT_COMMIT_HASH
- DATA_API_BASE_URL
networks:
- intranet
expose:
- 8080
- 8081
restart: on-failure
labels:
- 'traefik.enable=true'
- 'traefik.backend=website'
- 'traefik.frontend.rule=HostRegexp:nusmods.com,{subdomain:[0-9]+}.nusmods.com'
- 'traefik.port=8080'
export:
build:
context: .
dockerfile: export/Dockerfile.prod
env_file:
- export/.env
networks:
- intranet
expose:
- 8082
depends_on:
- website
init: true
security_opt:
- seccomp="infra/instance/chromium.seccomp.json"
environment:
- NODE_ENV=production
- PORT=8082
- HOST=0.0.0.0
- PAGE=http://website:8081
- CHROME_EXECUTABLE=/usr/bin/chromium-browser
restart: on-failure
labels:
- 'traefik.enable=true'
- 'traefik.backend=export'
- 'traefik.frontend.rule=HostRegexp:nusmods.com,{subdomain:[0-9]+}.nusmods.com;PathPrefixStrip:/export/'
- 'traefik.port=8082'
# Connect to a bridge network called 'intranet',
# which allows communication with other docker-compose setups
networks:
intranet:
external:
name: machine_intranet