-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
120 lines (114 loc) · 3.21 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
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
version: '3.6'
networks:
web-network:
services:
dungeon-revealer:
build:
context: ./dungeon-revealer/
dockerfile: Dockerfile
network: host
user: 1000:1000
working_dir: /usr/src/app
container_name: dungeon-revealer
restart: always
command: /bin/sh -c "cp -a ./build/* ./build-export/ && node server-build/index.js"
environment:
- PC_PASSWORD=${DR_USER_PASS}
- DM_PASSWORD=${DR_DM_PASS}
volumes:
- ./dungeon-revealer/data:/usr/src/app/data
- ./dungeon-revealer/build/:/usr/src/app/build-export:rw
networks:
- web-network
improved-initiative:
build:
context: ./improved-initiative/
dockerfile: Dockerfile
network: host
user: 1000:1000
working_dir: /usr/src/app
container_name: improved-initiative
restart: always
command: /bin/bash -c "cp -a ./public/* ./public-tmp/ && node server/server.js"
environment:
- PORT=4000
- DB_CONNECTION_STRING=mongodb://mongo:27017/
volumes:
- ./improved-initiative/public-tmp/:/usr/src/app/public-tmp:rw
links:
- mongo:27017
networks:
- web-network
paragon:
build:
context: ./paragon/
dockerfile: Dockerfile
network: host
user: 1000:1000
working_dir: /usr/src/app
container_name: paragon
restart: always
command: /bin/sh -c "export PATH=$PATH:/home/node/.npm-global/bin/ && cp -a ./build-tmp/* ./build/ && serve -s build -l 3000"
volumes:
- ./paragon/build/:/usr/src/app/build/:rw
networks:
- web-network
mongo:
image: mongo:latest
user: 1000:1000
container_name: mongo
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME
- MONGO_INITDB_ROOT_PASSWORD
volumes:
- ./mongo/data:/data/db:rw
networks:
- web-network
nginx:
build:
args:
- ht_pass=${DR_USER_PASS}
- ht_user=${HT_USER}
- ht_dm_pass=${DR_DM_PASS}
- ht_dm_user=${HT_DM_USER}
context: ./nginx/
dockerfile: Dockerfile
network: host
user: 1000:1000
container_name: nginx
restart: always
command: ["bash", "-c", "NGINX_ENVSUBST_TEMPLATE_DIR=/etc/nginx NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx /docker-entrypoint.d/20-envsubst-on-templates.sh && NGINX_ENVSUBST_TEMPLATE_DIR=/etc/nginx/conf.d NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d /docker-entrypoint.d/20-envsubst-on-templates.sh && sudo nginx -g 'daemon off;'"]
environment:
- HTACCESS
- DOMAIN
- DOMAIN_EMAIL
- DR_HOST
- DR_HOST_CN
- II_HOST
- II_HOST_CN
- PA_HOST
- PA_HOST_CN
- DM_HOST
- SSL
- RESOLVER
volumes:
- ./nginx/files/:/etc/nginx/:rw
- ./nginx/ssl/:/etc/letsencrypt/:rw
- ./nginx/files/img/:/var/www/img/:rw
- ./dungeon-revealer/build/:/var/www/dungeon-revealer/:rw,cached
- ./improved-initiative/public-tmp/:/var/www/improved-initiative/:rw
- ./paragon/build/:/var/www/paragon/:rw
ports:
- '80:80'
- '443:443'
links:
- dungeon-revealer:3000
- improved-initiative:4000
- paragon:3000
networks:
- web-network
depends_on:
- dungeon-revealer
- improved-initiative
- paragon