Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (83 loc) · 2.27 KB
/
Copy pathdocker-compose.yml
File metadata and controls
87 lines (83 loc) · 2.27 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
services:
mongodb:
image: mongo:7
volumes:
- mongodb-data:/data/db
ports:
- "127.0.0.1:27017:27017"
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.runCommand({ ping: 1 }).ok"]
interval: 5s
timeout: 5s
retries: 12
restart: always
redis:
image: redis:7-alpine
volumes:
- redis-data:/data
ports:
- "127.0.0.1:6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 12
restart: always
backend:
build: ./backend
environment:
MONGO_URI: mongodb://mongodb:27017/pentestcopilot
REDIS_URL: redis://redis:6379
CODEX_HOME: /root/.codex
SSH_CONFIG_FILE: /root/.ssh/config
# "Local" work hosts execute in the backend runtime. Keep their folders
# on the persistent backend-data volume across rebuilds/restarts.
WORKSPACE_DIR: /srv/data/workspaces
HTTP_PROXY: "${HTTP_PROXY:-}"
HTTPS_PROXY: "${HTTPS_PROXY:-}"
NO_PROXY: "${NO_PROXY:-localhost,127.0.0.1,mongodb,redis,kali}"
extra_hosts:
- "host.docker.internal:host-gateway"
cap_add:
# Required only when a workspace selects Local and starts OpenVPN there.
- NET_ADMIN
ports:
- "127.0.0.1:8080:8080"
- "127.0.0.1:6080:6080"
- "127.0.0.1:9020:9020"
volumes:
- ./kali-data:/kali-data
- backend-data:/srv/data
- ./backend/.env:/srv/data/.env
- ./backend/model-registry.json:/srv/data/model-registry.json
- ./config.toml:/srv/data/config.toml:ro
depends_on:
redis:
condition: service_healthy
mongodb:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:8080/api/healthcheck').then(r => { if (!r.ok) process.exit(1) }).catch(() => process.exit(1))"]
interval: 5s
timeout: 5s
retries: 24
start_period: 10s
frontend:
build:
context: ./frontend
ports:
- "127.0.0.1:3000:3000"
env_file:
- ./frontend/.env
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
volumes:
mongodb-data:
driver: local
redis-data:
driver: local
backend-data:
driver: local