-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (51 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
56 lines (51 loc) · 1.04 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
version: '3.8'
services:
client:
build:
context: .
dockerfile: ./docker/Dockerfile.client
ports:
- "3000:3000"
volumes:
- ./client:/app/client
- /app/client/node_modules
depends_on:
- server
environment:
- VITE_API_URL=http://localhost:5000/api
networks:
- app-network
server:
build:
context: .
dockerfile: ./docker/Dockerfile.server
ports:
- "5000:5000"
volumes:
- ./server:/app/server
- /app/server/node_modules
depends_on:
- mongo
environment:
- NODE_ENV=development
- PORT=5000
- MONGODB_URI=mongodb://mongo:27017/code-editor
- JWT_SECRET=your-secret-jwt-key-for-development
- JWT_EXPIRATION=7d
- CORS_ORIGIN=http://localhost:3000
networks:
- app-network
mongo:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
mongo-data:
driver: local