Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (85 loc) · 2.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
91 lines (85 loc) · 2.3 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# ===========================================
# ISMS Backend - 開発環境用 Docker Compose
# ===========================================
# 開発環境での使用を想定した設定です
version: '3.8'
services:
# バックエンドサービス
backend:
build:
context: .
dockerfile: Dockerfile
container_name: isms-backend
ports:
- "8080:8080"
environment:
# 開発環境設定
- APP_ENV=development
- DATABASE_PATH=/app/data/isms_dev.db
- DATABASE_TYPE=sqlite
- SERVER_PORT=8080
- FRONTEND_URL=http://localhost:3000
- JWT_SECRET=development-secret-key-docker
- CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173
volumes:
# データベースファイルを永続化
- ./data:/app/data
# 開発時のホットリロード用(オプション)
- ./config:/app/config:ro
networks:
- isms-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
# フロントエンドサービス
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: isms-frontend
ports:
- "3000:3000"
environment:
- VITE_API_BASE_URL=http://localhost:8080
- VITE_IS_DEVELOPMENT=true
depends_on:
backend:
condition: service_healthy
networks:
- isms-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
# 開発用データベース管理ツール(オプション)
db-admin:
image: adminer:latest
container_name: isms-db-admin
ports:
- "8081:8080"
environment:
- ADMINER_DEFAULT_SERVER=backend
depends_on:
- backend
networks:
- isms-network
profiles:
- tools # docker-compose --profile tools up で起動
restart: unless-stopped
# ネットワーク設定
networks:
isms-network:
driver: bridge
name: isms-network
# ボリューム設定
volumes:
isms-data:
driver: local
name: isms-data