-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdev-docker-compose.yml
234 lines (221 loc) · 6.12 KB
/
dev-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
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
- ./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
- ./map_files:/var/www/html/map_files
- ./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 # Ensure php service starts after db service
environment:
MYSQL_HOST: db # Use service name 'db' for DNS resolution
MYSQL_PORT: 3306 # Default MySQL/MariaDB port
MYSQL_USER: hisp_md
MYSQL_PASSWORD: hisp_md
MYSQL_DATABASE: hisp_md
networks:
- hispmdnet
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
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
- ./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
- ./map_files:/var/www/html/map_files
- ./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
metabase:
image: metabase/metabase:v0.50.12
container_name: hispmd_viz
hostname: metabase
volumes:
- hispmd_vizdata:/metabase-data
ports:
- "4004:3000"
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: postgres
MB_ADMIN_EMAIL: dev@merqconsultancy.org
MB_ADMIN_FIRST_NAME: MERQ
MB_ADMIN_PASSWORD: hispmdmerqdev0
depends_on:
- postgres
networks:
- hispmdnet
postgres:
image: postgres:latest
container_name: hispmd_postgres
hostname: postgres
environment:
POSTGRES_DB: hispmddb
POSTGRES_USER: hispmddb
POSTGRES_PASSWORD: hispmddb
volumes:
- ./src/hispmddb:/docker-entrypoint-initdb.d/hispmddb
networks:
- hispmdnet
db:
image: mariadb:11.2.4
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
- ./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
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
pgadmin:
image: dpage/pgadmin4:latest
ports:
- "5434:80"
environment:
PGADMIN_DEFAULT_EMAIL: dev@merqconsultancy.org
PGADMIN_DEFAULT_PASSWORD: merqhispmddev
volumes:
- hispmd_pgadmindata:/var/lib/pgadmin
depends_on:
- postgres
networks:
- hispmdnet
mongo:
image: mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: merqhispmddev
MONGO_INITDB_ROOT_PASSWORD: merqhispmddev
volumes:
- hispmd_mongodata:/data/db
networks:
- hispmdnet
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
grafana:
image: grafana/grafana-enterprise
container_name: hispmd_grafana
restart: unless-stopped
ports:
- "3030:3000"
volumes:
- grafana-storage:/var/lib/grafana
networks:
- hispmdnet
volumes:
hispmd_pgadmindata:
hispmd_vizdata:
hispmd_mongodata:
grafana-storage:
networks:
hispmdnet:
driver: bridge