-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
124 lines (123 loc) · 3.2 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
121
122
123
124
version: '3.8'
services:
database:
image: postgres:12
restart: on-failure
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test
- POSTGRES_DB=test
ports:
- "5432:5432"
volumes:
- database:/var/lib/postgresql/data
watch:
image: node:14-alpine
restart: on-failure
working_dir: /kanjimi
command: ./node_modules/.bin/tsc --watch -p ./src/Server/tsconfig.json
volumes:
- $PWD:/kanjimi
server:
build:
context: .
dockerfile: ./dist/docker/server.Dockerfile
args:
- NODE_ENV=development
- KANJIMI_API_URL=https://localhost/api
- KANJIMI_WWW_URL=https://localhost
restart: on-failure
depends_on:
- database
- watch
environment:
- KANJIMI_DATABASE_HOST=database
- KANJIMI_DATABASE_PORT=5432
- KANJIMI_DATABASE_DATABASE=test
- KANJIMI_DATABASE_USER=test
- KANJIMI_DATABASE_PASSWORD=test
- KANJIMI_DATABASE_USE_SSL=false
- KANJIMI_SMTP_HOST=smtp
- KANJIMI_SMTP_PORT=25
- KANJIMI_SMTP_SECURE=false
env_file:
- docker-compose.env
user: root
command: ./node_modules/.bin/nodemon -w ./dist/server --expose-gc dist/server/Server/server.js
volumes:
- $PWD:/kanjimi
- mails:/tmp/mails
nginx:
build:
context: .
dockerfile: ./dist/docker/nginx.Dockerfile
args:
- KANJIMI_NGINX_REMOVE_TEST_PAGES=false
- KANJIMI_NGINX_CERTIFICATE_DOMAIN=localhost
- KANJIMI_API_URL=https://localhost/api
- KANJIMI_WWW_URL=https://localhost
restart: on-failure
environment:
- KANJIMI_NGINX_UPSTREAM=server:3000
- KANJIMI_NGINX_DOMAIN=localhost
- KANJIMI_NGINX_CACHE_DURATION=0
- KANJIMI_NGINX_COMMENT_TEST_PAGES=
- KANJIMI_NGINX_COMMENT_FORCE_DOMAIN=#
depends_on:
- server
volumes:
- $PWD/www:/kanjimi/www
ports:
- "80:80"
- "443:443"
extension:
image: node:14-alpine
restart: on-failure
working_dir: /kanjimi
environment:
- KANJIMI_EXTENSION_HOST=localhost
env_file:
- docker-compose.env
command: >
sh -c "
./node_modules/.bin/webpack --color --config=src/Extension/webpack.config.js --build;
./node_modules/.bin/webpack --color --config=src/Extension/webpack.config.js --watch
"
healthcheck:
test: cat ./dist/extension/content.build.js
interval: 3s
timeout: 1s
retries: 3
start_period: 30s
volumes:
- $PWD:/kanjimi
webapp:
image: node:14-alpine
restart: on-failure
working_dir: /kanjimi
env_file:
- docker-compose.env
command: >
sh -c "
./node_modules/.bin/webpack --color --config=src/WebApp/webpack.config.js --build;
./node_modules/.bin/webpack --color --config=src/WebApp/webpack.config.js --watch
"
healthcheck:
test: cat ./www/js/app.build.js
interval: 3s
timeout: 1s
retries: 3
start_period: 30s
volumes:
- $PWD:/kanjimi
smtp:
image: hmlio/spamsink
restart: on-failure
environment:
- SINK_PORT=25
- SINK_HOSTNAME=smtp
volumes:
- mails:/opt/spamsink/mails
volumes:
database:
mails: