-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
57 lines (52 loc) · 1.1 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
version: '3.8'
services:
frontend:
build:
context: ./frontend
container_name: frontend
ports:
- 5173:5173
depends_on:
- backend
networks:
- app-network
backend:
build:
context: ./backend
platforms:
- "linux/arm64"
# - "linux/amd64"
environment:
PORT: 5000
FRONTEND_URL: 'http://localhost:5173'
JWT_SECRET: ${JWT_SECRET}
MYSQL_URL_DOCKER: ${MYSQL_URL_DOCKER}
NODE_ENV: production
ports:
- 5000:5000
depends_on:
mysql:
condition: service_healthy
networks:
- app-network
mysql:
image: mysql
container_name: mysql_db
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- 3306:3306
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
restart: always
networks:
- app-network
networks:
app-network:
driver: bridge