-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (39 loc) · 944 Bytes
/
docker-compose.yml
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
version: '3.8'
services:
backend:
build:
context: ./backend
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
volumes:
- ./backend:/app
ports:
- "8000:8000"
backend_tests:
build:
context: ./backend
command: pytest --cov=app
volumes:
- ./backend:/app
frontend:
build:
context: ./frontend
command: sh -c "npm install && npm run dev -- --host 0.0.0.0 --port 5173"
volumes:
- ./frontend:/app
ports:
- "5173:5173"
environment:
- VITE_BASE_URL=${VITE_BASE_URL}
- VITE_API_URL=${VITE_API_URL}
frontend_tests:
build:
context: ./frontend
command: sh -c "wait-on http://frontend:5173 && npx playwright test"
volumes:
- ./frontend:/app
environment:
- VITE_BASE_URL=${VITE_BASE_URL}
- VITE_API_URL=${VITE_API_URL}
depends_on:
- frontend
- backend