Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
151 lines (140 loc) · 2.91 KB
/
Copy pathdocker-compose.yml
File metadata and controls
151 lines (140 loc) · 2.91 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
services:
mongodb:
image: mongo:7
container_name: ksl-mongodb
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
networks:
- ksl-network
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: ksl-backend
ports:
- "3000:3000"
environment:
NODE_ENV: development
PORT: 3000
MONGODB_URI: mongodb://mongodb:27017/krishna-security-lab
JWT_ACCESS_SECRET: dev-access-secret-change-me-in-production-32chars
JWT_REFRESH_SECRET: dev-refresh-secret-change-me-in-production-32ch
CORS_ORIGIN: http://localhost:5173
depends_on:
- mongodb
networks:
- ksl-network
restart: unless-stopped
volumes:
- ./backend/src:/app/src
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: ksl-frontend
ports:
- "5173:5173"
environment:
VITE_API_URL: http://localhost:3000
depends_on:
- backend
networks:
- ksl-network
restart: unless-stopped
volumes:
- ./frontend/src:/app/src
# --- Intentionally vulnerable labs (isolated; do not expose publicly) ---
lab-auth:
image: node:20-alpine
working_dir: /app
volumes:
- ./labs/auth:/app
command: sh -c "npm install && npm start"
ports:
- "4001:4001"
networks:
- ksl-labs
profiles:
- labs
lab-nosql:
image: node:20-alpine
working_dir: /app
volumes:
- ./labs/nosql-injection:/app
command: sh -c "npm install && npm start"
ports:
- "4002:4002"
networks:
- ksl-labs
profiles:
- labs
lab-xss:
image: node:20-alpine
working_dir: /app
volumes:
- ./labs/xss:/app
command: sh -c "npm install && npm start"
ports:
- "4003:4003"
networks:
- ksl-labs
profiles:
- labs
lab-idor:
image: node:20-alpine
working_dir: /app
volumes:
- ./labs/idor:/app
command: sh -c "npm install && npm start"
ports:
- "4004:4004"
networks:
- ksl-labs
profiles:
- labs
lab-jwt:
image: node:20-alpine
working_dir: /app
volumes:
- ./labs/jwt:/app
command: sh -c "npm install && npm start"
ports:
- "4005:4005"
networks:
- ksl-labs
profiles:
- labs
lab-api:
image: node:20-alpine
working_dir: /app
volumes:
- ./labs/api-security:/app
command: sh -c "npm install && npm start"
ports:
- "4006:4006"
networks:
- ksl-labs
profiles:
- labs
lab-rbac:
image: node:20-alpine
working_dir: /app
volumes:
- ./labs/rbac:/app
command: sh -c "npm install && npm start"
ports:
- "4007:4007"
networks:
- ksl-labs
profiles:
- labs
networks:
ksl-network:
driver: bridge
ksl-labs:
driver: bridge
volumes:
mongodb_data: