-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
60 lines (57 loc) · 1.72 KB
/
docker-compose.dev.yml
File metadata and controls
60 lines (57 loc) · 1.72 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
# Configuration Docker pour développement avec build optimisé
# Usage: docker-compose -f docker-compose.dev.yml up --build
# Avantages: Context racine, shared types intégrés, build reproductible
services:
frontend:
build:
context: . # Context racine pour accès aux shared types
dockerfile: ./frontend/Dockerfile.dev
container_name: staka_frontend_build
ports:
- "3000:5173" # Frontend accessible sur http://localhost:3000
environment:
- VITE_API_URL=http://localhost:3001
- NODE_ENV=development
volumes:
- ./frontend:/app
- ./shared:/shared # Shared types pour développement
- /app/node_modules
depends_on:
- backend
restart: unless-stopped
backend:
build:
context: . # Context racine pour accès aux shared types
dockerfile: ./backend/Dockerfile.dev
container_name: staka_backend_build
ports:
- "3001:3000" # Backend interne sur 3000, externe sur 3001
env_file:
- ./backend/.env
environment:
- NODE_ENV=development
volumes:
- ./backend:/app
- ./shared:/shared # Shared types pour développement
- /app/node_modules
- ./backend/uploads:/app/uploads # Stockage local persistant
depends_on:
- db
restart: unless-stopped
db:
image: mysql:8.0
container_name: staka_db_build
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=stakalivres
- MYSQL_USER=staka
- MYSQL_PASSWORD=staka
volumes:
- db_data_build:/var/lib/mysql
- ./backend/prisma/migrations:/migrations
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
volumes:
db_data_build: