-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.yaml
154 lines (146 loc) · 4.07 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
x-common-variables: &common-variables
API_PORT: "31339"
GRAPE_APH: "30001"
GRAPE_HOST: "grape1"
x-logging: &default-logging
options:
max-size: "10m"
max-file: "10"
driver: json-file
services:
grape1:
container_name: grape1
build:
context: .
dockerfile: Dockerfile.grenache-grape
restart: unless-stopped
networks:
- grapes
environment:
<<: *common-variables
GRAPE_DP: "20001"
GRAPE_BN: "20002"
GRAPE_BIND: "grape2"
NODE_ENV: ${NODE_ENV}
logging: *default-logging
grape2:
container_name: grape2
build:
context: .
dockerfile: Dockerfile.grenache-grape
restart: unless-stopped
depends_on:
grape1:
condition: service_healthy
networks:
- grapes
environment:
<<: *common-variables
GRAPE_DP: "20002"
GRAPE_APH: "40001"
GRAPE_BN: "20001"
GRAPE_BIND: "grape1"
NODE_ENV: ${NODE_ENV}
logging: *default-logging
worker:
container_name: worker
build:
context: .
dockerfile: Dockerfile.worker
restart: unless-stopped
depends_on:
grape1:
condition: service_healthy
grape2:
condition: service_healthy
network_mode: "service:grape1"
volumes:
- temp:/home/node/bfx-reports-framework/temp
- ./db:/home/node/bfx-reports-framework/db
- ./report-files:/home/node/bfx-reports-framework/report-files
- ./logs:/home/node/bfx-reports-framework/logs
environment:
<<: *common-variables
WORKER_API_PORT: "1337"
WORKER_WS_PORT: "1455"
TEMP_FOLDER: "/home/node/bfx-reports-framework/temp"
DB_FOLDER: "/home/node/bfx-reports-framework/db"
REPORT_FOLDER: "/home/node/bfx-reports-framework/report-files"
LOGS_FOLDER: "/home/node/bfx-reports-framework/logs"
SECRET_KEY: ${SECRET_KEY} # Required
SCHEDULER_RULE: ${SCHEDULER_RULE} # Non-required
NGINX_AUTOINDEX: ${NGINX_AUTOINDEX} # Required
NODE_ENV: ${NODE_ENV}
logging: *default-logging
express:
container_name: express
build:
context: .
dockerfile: Dockerfile.express
restart: unless-stopped
depends_on:
worker:
condition: service_healthy
grape1:
condition: service_healthy
grape2:
condition: service_healthy
networks:
- grapes
- front-net
volumes:
- ./logs:/home/node/bfx-report-express/logs
environment:
<<: *common-variables
NODE_ENV: ${NODE_ENV}
logging: *default-logging
ui-builder:
build:
context: .
dockerfile: Dockerfile.ui-builder
volumes:
- front-build:/home/node/bfx-report-ui/front-build
environment:
FRONT_BUILD_FOLDER: "/home/node/bfx-report-ui/front-build"
CI_ENVIRONMENT_NAME: ${UI_ENV} # Non-required
NGINX_HOST: ${NGINX_HOST} # Required
NGINX_PORT: ${NGINX_PORT} # Non-required
logging: *default-logging
nginx:
container_name: nginx
image: nginx:1.21.5-alpine
restart: unless-stopped
depends_on:
express:
condition: service_healthy
networks:
- front-net
ports:
- "${NGINX_PORT}:8080"
volumes:
- front-build:/var/www/html
- ./scripts/maintenance:/var/www/maintenance
- ./nginx-configs/autoindex-format.xslt:/etc/nginx/autoindex-format.xslt:ro
- ./nginx-configs/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx-configs/templates:/etc/nginx/templates
- ./logs:/var/log/nginx/bfx-reports-framework
- ./report-files:/var/www/report-files
environment:
<<: *common-variables
REPORT_FOLDER: "/var/www/report-files"
MAINTENANCE_STATIC_FOLDER: "/var/www/maintenance"
FRONT_BUILD_FOLDER: "/var/www/html"
LOGS_FOLDER: "/var/log/nginx/bfx-reports-framework"
NGINX_HOST: ${NGINX_HOST} # Required
NGINX_PORT: ${NGINX_PORT} # Non-required
NGINX_ENV: ${NGINX_ENV} # Non-required
NGINX_AUTOINDEX: ${NGINX_AUTOINDEX} # Required
logging: *default-logging
networks:
grapes:
driver: bridge
front-net:
driver: bridge
volumes:
temp:
front-build: