-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
285 lines (271 loc) · 7.79 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
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
version: '3.9'
services:
php:
build:
context: .
dockerfile: Dockerfile
container_name: hispmd_system
volumes:
- ./analytics:/var/www/html/analytics
- ./api:/var/www/html/api
- ./app:/var/www/html/app
- ./calendar:/var/www/html/calendar
- ./composer.json:/var/www/html/composer.json
- ./composer.lock:/var/www/html/composer.lock
- ./config:/var/www/html/config
- ./.env:/var/www/html/.env
- ./index.php:/var/www/html/index.php
- ./LICENSE:/var/www/html/LICENSE
- ./maps:/var/www/html/maps
- ./mysql-init:/var/www/html/mysql-init
- ./README.md:/var/www/html/README.md
- ./server.html:/var/www/html/server.html
- ./src:/var/www/html/src
- ./styles:/var/www/html/styles
- ./test:/var/www/html/test
- ./test.php:/var/www/html/test.php
- ./vendor:/var/www/html/vendor
- /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock # Mount the MySQL socket file
expose:
- "9000"
depends_on:
- db
environment:
MYSQL_HOST: db
MYSQL_PORT: 3306
MYSQL_USER: hisp_md
MYSQL_PASSWORD: hisp_md
MYSQL_DATABASE: hisp_md
networks:
hispmdnet:
ipv4_address: 192.168.128.10
chat:
build:
context: .
dockerfile: Dockerfile
image: hispmd_chatbot
container_name: hispmd_chatbot
ports:
- "8501:8501"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8501/_stcore/health"]
interval: 10s
timeout: 5s
retries: 3
volumes:
- ./ai/chat:/ai/chat
- ./ai/chat/.env:/ai/chat/.env
- ./ai/chat/certs:/ai/chat/certs
- ./ai/chat/.streamlit/config.toml:/root/.streamlit/config.toml
environment:
- PYTHONUNBUFFERED=1
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_PORT=${MYSQL_PORT}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- SSH_USE=${SSH_USE}
- SSH_HOST=${SSH_HOST}
- SSH_PORT=${SSH_PORT}
- SSH_USER=${SSH_USER}
- SSH_PASSWORD=${SSH_PASSWORD}
- LOCAL_PORT=${LOCAL_PORT}
- GROQ_API_KEY=${GROQ_API_KEY}
env_file:
- .env
networks:
hispmdnet:
ipv4_address: 192.168.128.5
nginx:
image: nginx:latest
container_name: hispmd_nginx
ports:
- "8080:80"
- "8443:443"
volumes:
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf
- ./analytics:/var/www/html/analytics
- ./api:/var/www/html/api
- ./app:/var/www/html/app
- ./calendar:/var/www/html/calendar
- ./composer.json:/var/www/html/composer.json
- ./composer.lock:/var/www/html/composer.lock
- ./config:/var/www/html/config
- ./.env:/var/www/html/.env
- ./index.php:/var/www/html/index.php
- ./LICENSE:/var/www/html/LICENSE
- ./maps:/var/www/html/maps
- ./mysql-init:/var/www/html/mysql-init
- ./README.md:/var/www/html/README.md
- ./server.html:/var/www/html/server.html
- ./src:/var/www/html/src
- ./styles:/var/www/html/styles
- ./test:/var/www/html/test
- ./test.php:/var/www/html/test.php
- ./vendor:/var/www/html/vendor
depends_on:
- php
networks:
hispmdnet:
ipv4_address: 192.168.128.12
metabase:
image: metabase/metabase:latest
container_name: hispmd_viz
hostname: metabase
volumes:
- ./src/hispmd_vizdata:/metabase-data
ports:
- "127.0.0.1:4004:3000" # Bind to specific IP address
environment:
MB_DB_FILE: /metabase-data/hispmd.db
MB_DB_TYPE: postgres
MB_DB_DBNAME: hispmddb
MB_DB_PORT: 5432
MB_DB_USER: hispmddb
MB_DB_PASS: hispmddb
MB_DB_HOST: 192.168.128.4 #postgres
MB_ADMIN_EMAIL: [email protected]
MB_ADMIN_FIRST_NAME: MERQ
MB_ADMIN_PASSWORD: hispmdmerqdev0
depends_on:
- postgres
networks:
hispmdnet:
ipv4_address: 192.168.128.9
postgres:
image: postgres:latest
container_name: hispmd_postgres
hostname: postgres
healthcheck:
test: ["CMD", "pg_isready", "-U", "hispmddb"]
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_DB: hispmddb
POSTGRES_USER: hispmddb
POSTGRES_PASSWORD: hispmddb
volumes:
- ./src/hispmddb:/var/lib/postgresql/data
#- ./src/hispmddb:/docker-entrypoint-initdb.d/hispmddb
networks:
hispmdnet:
ipv4_address: 192.168.128.4
db:
image: mariadb:11.2.4
container_name: hispmd_mariadb
restart: always
environment:
MYSQL_ROOT_HOST: localhost
MYSQL_DATABASE: hisp_md
MYSQL_ROOT_PASSWORD: merqhispmdadmin
MYSQL_USER: hisp_md
MYSQL_PASSWORD: hisp_md
volumes:
- ./src/hispmd_dev.sql:/docker-entrypoint-initdb.d/hispmd_dev.sql
- ./src/hispmd_matomo.sql:/docker-entrypoint-initdb.d/hispmd_matomo.sql
- ./mysql-init:/docker-entrypoint-initdb.d
#- /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock # Mount the MySQL socket file if there is no conflict with the host server
networks:
hispmdnet:
ipv4_address: 192.168.128.7
phpmyadmin:
image: phpmyadmin:5.2.1
restart: always
ports:
- "3308:80"
environment:
PMA_ARBITRARY: 1
PMA_HOSTS: db
PMA_USER: hisp_md
PMA_PASSWORD: hisp_md
networks:
hispmdnet:
ipv4_address: 192.168.128.2
pgadmin:
image: dpage/pgadmin4:latest
ports:
- "5434:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: merqhispmddev
volumes:
- hispmd_pgadmindata:/var/lib/pgadmin
depends_on:
- postgres
networks:
hispmdnet:
ipv4_address: 192.168.128.8
mongo:
image: mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: merqhispmddev
MONGO_INITDB_ROOT_PASSWORD: merqhispmddev
volumes:
- hispmd_mongodata:/data/db
networks:
hispmdnet:
ipv4_address: 192.168.128.6
mongo-express:
image: mongo-express:1.0.2
restart: always
ports:
- "8118:8018"
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: merqhispmddev
ME_CONFIG_MONGODB_ADMINPASSWORD: merqhispmddev
ME_CONFIG_MONGODB_URL: mongodb://merqhispmddev:merqhispmddev@mongo:27017/
depends_on:
- mongo
networks:
hispmdnet:
ipv4_address: 192.168.128.11
grafana:
image: grafana/grafana-enterprise
container_name: hispmd_grafana
restart: unless-stopped
ports:
- "3030:3000"
volumes:
- ./src/hispmd_grafana:/var/lib/grafana
networks:
hispmdnet:
ipv4_address: 192.168.128.3
#hispmd_matomo:
# image: bitnami/matomo:latest
# container_name: hispmd_matomo
# ports:
# - "8910:8080" # Exposing port 8081 to avoid conflicts
# environment:
# MATOMO_DATABASE_HOST: ${MATOMO_DATABASE_HOST}
# MATOMO_DATABASE_PORT_NUMBER: ${MATOMO_DATABASE_PORT}
# MATOMO_DATABASE_NAME: ${MATOMO_DATABASE_NAME}
# MATOMO_DATABASE_USER: ${MATOMO_DATABASE_USER}
# MATOMO_DATABASE_PASSWORD: ${MATOMO_DATABASE_PASSWORD}
# ALLOW_EMPTY_PASSWORD: "no"
# MATOMO_USERNAME: ${MATOMO_USERNAME}
# MATOMO_PASSWORD: ${MATOMO_PASSWORD}
# MATOMO_EMAIL: ${MATOMO_EMAIL}
# MATOMO_WEBSITE_NAME: ${MATOMO_WEBSITE_NAME}
# MATOMO_WEBSITE_HOST: ${MATOMO_WEBSITE_HOST}
# volumes:
# #- ./src/hispmd_matomo:/bitnami/matomo # Data persistence volume for Matomo
# - hispmd_matomo:/bitnami/matomo
# depends_on:
# - db
# networks:
# hispmdnet:
# ipv4_address: 192.168.128.113
volumes:
hispmd_pgadmindata:
hispmd_vizdata:
hispmd_mongodata:
grafana-storage:
#hispmd_matomo:
networks:
hispmdnet:
driver: bridge
ipam:
config:
- subnet: 192.168.128.0/24