-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
44 lines (41 loc) · 1.23 KB
/
Copy pathcompose.dev.yaml
File metadata and controls
44 lines (41 loc) · 1.23 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
# Override de développement avec hot reload.
#
# Usage :
# docker compose -f compose.yaml -f compose.dev.yaml up -d
# E2E_BASE_URL=http://localhost:3000 cd e2e && npm test
#
# - `app` (Symfony) : volumes sur backend/* → PHP réinterprété à chaud
# - `frontend` (nouveau) : Vite dev server sur :3000 avec hot reload
#
# Le frontend Vite proxify /api, /admin, /uploads… vers le service app via
# son nom de réseau Docker (http://app:80), de sorte que tout passe par :3000.
services:
app:
build:
target: test
environment:
APP_ENV: dev
APP_DEBUG: "1"
volumes:
- ./backend/assets:/app/assets
- ./backend/bin/console:/app/bin/console
- ./backend/config:/app/config
- ./backend/migrations:/app/migrations
- ./backend/public:/app/public
- ./backend/src:/app/src
- ./backend/templates:/app/templates
frontend:
image: node:22-alpine
working_dir: /app
ports:
- "3000:3000"
environment:
VITE_API_BASE_URL: "http://app:80"
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
command: sh -c "npm ci --no-audit --no-fund && npm run dev -- --host 0.0.0.0"
depends_on:
- app
volumes:
frontend_node_modules: