-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (59 loc) · 1.36 KB
/
docker-compose.yml
File metadata and controls
61 lines (59 loc) · 1.36 KB
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
# /Site/docker-compose.yml
version: "3.8"
services:
redis:
image: redis:alpine
platform: linux/arm64/v8
mysql:
image: mysql:8.3.0
platform: linux/x86_64
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
volumes:
- ./init-scripts:/docker-entrypoint-initdb.d
- ./storage/mysql:/var/lib/mysql # Store MySQL data in the ./storage/mysql directory
ports:
- "3306:3306"
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-p$$MYSQL_ROOT_PASSWORD",
"--protocol",
"tcp",
]
interval: 10s
timeout: 5s
retries: 5
backend:
build: ./
environment:
DB_HOST: mysql # Use the MySQL service name as the host
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASSWORD}
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
redis:
condition: service_started
mysql:
condition: service_healthy
restart: true
frontend:
build: ./meshapp
volumes:
- ./meshapp:/app
- /app/node_modules
ports:
- "3000:3000"
environment:
CHOKIDAR_USEPOLLING: true # enables polling mechanism via chokidar for hot-loading in development
REACT_APP_API_URL: "http://localhost:8000"
networks:
default: