-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (65 loc) · 1.4 KB
/
docker-compose.yml
File metadata and controls
69 lines (65 loc) · 1.4 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
66
67
68
69
# docker-compose.yml
services:
db:
image: postgres:16
container_name: meetolio_db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: meetolio
ports:
- "5433:5432"
volumes:
- db_data:/var/lib/postgresql/data
networks:
- appnet
backend:
platform: linux/amd64
build:
context: ./backend
dockerfile: Dockerfile
container_name: meetolio_backend
depends_on:
- db
ports:
- "8080:8080"
networks:
- appnet
volumes:
- ./backend:/app
- gradle-cache:/home/gradle/.gradle # 依存キャッシュを永続化
working_dir: /app
command: ["gradle", "bootRun"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
interval: 15s
timeout: 5s
retries: 3
start_period: 30s
frontend:
platform: linux/amd64
build:
context: ./frontend
dockerfile: Dockerfile
container_name: meetolio_frontend
ports:
- "5173:5173"
networks:
- appnet
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules # node_modules をコンテナ側に保持
command: >
sh -c "
npm install --force &&
npm run dev -- --host
"
depends_on:
- backend
networks:
appnet:
driver: bridge
# データ永続化
volumes:
db_data:
gradle-cache: