-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yml
41 lines (39 loc) · 1.06 KB
/
docker-compose.test.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
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev # Consistent naming with production Dockerfile
ports:
- "${FRONTEND_PORT:-3000}:3000"
environment:
- NODE_ENV=${FRONTEND_NODE_ENV:-development}
- VITE_API_URL=http://backend:${BACKEND_PORT:-5000} # Enables internal network communication
- PORT=${FRONTEND_PORT:-3000}
- CHOKIDAR_USEPOLLING=true
volumes:
- ./frontend:/app
- /app/node_modules
command: "npm run test"
depends_on:
- backend
networks:
- app-network
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
ports:
- "${BACKEND_PORT:-5000}:5000"
environment:
- NODE_ENV=${BACKEND_NODE_ENV:-development}
- PORT=${BACKEND_PORT:-5000}
- POSTGRES_CONNECTION_STRING=${POSTGRES_CONNECTION_STRING:?Missing Postgres connection string}
volumes:
- ./backend:/app
- /app/node_modules
command: "npm run test"
networks:
- app-network
networks:
app-network:
driver: bridge