-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (61 loc) · 1.44 KB
/
docker-compose.yml
File metadata and controls
65 lines (61 loc) · 1.44 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
62
63
64
65
services:
db:
image: mysql:8.0
container_name: note-forge-db
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
ports:
- "127.0.0.1:3307:3306"
volumes:
- db_data:/var/lib/mysql
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:Z
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 10s
retries: 10
restart: unless-stopped
api:
build:
context: ./note-forge-api
container_name: note-forge-api
depends_on:
db:
condition: service_healthy
ports:
- "5000:5000"
environment:
- DB_HOST=db
- DB_PORT=3306
- DB_USER=${DB_USER}
- DB_NAME=${DB_NAME}
- DB_PASSWORD=${DB_PASSWORD}
- JWT_SECRET=${JWT_SECRET}
- NODE_ENV=development
- BASE_URL=http://api:5000
- FRONTEND_URL=http://localhost:5173
restart: unless-stopped
command: ["npm", "start"]
ui:
build: ./note-forge-ui
container_name: note-forge-ui
depends_on:
- api
ports:
- "5173:5173"
volumes:
- ./note-forge-ui:/app:Z
- /app/node_modules
environment:
- CHOKIDAR_USEPOLLING=true
- VITE_API_BASE_URL=http://localhost:5000
restart: unless-stopped
volumes:
db_data:
driver: local
networks:
default:
name: note_forge_network