-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
128 lines (115 loc) · 2.93 KB
/
Copy pathdocker-compose.yml
File metadata and controls
128 lines (115 loc) · 2.93 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
version: '3.8'
services:
warbunny:
build: .
image: warbunny:2.0.0
container_name: warbunny
restart: unless-stopped
# Network configuration
network_mode: host # For full network access
# Or use bridge mode with explicit ports:
# ports:
# - "5000:5000" # Web dashboard
# - "8080:8080" # Phishing server
# Privileged mode for network features
privileged: true
cap_add:
- NET_ADMIN
- NET_RAW
- SYS_ADMIN
# Environment variables
environment:
- WARBUNNY_ENV=production
- WARBUNNY_CONFIG=/opt/warbunny/.warbunny
- WARBUNNY_LOG_LEVEL=INFO
- TZ=UTC
- PYTHONUNBUFFERED=1
# Volumes for persistence
volumes:
- warbunny_data:/opt/warbunny/.warbunny
- warbunny_logs:/var/log/warbunny
- warbunny_reports:/opt/warbunny/warbunny_reports
- /var/run/docker.sock:/var/run/docker.sock:ro # Optional: for Docker monitoring
# Health check
healthcheck:
test: ["CMD", "python3", "/opt/warbunny/healthcheck.py"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Resource limits
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
# Optional: PostgreSQL for production database
postgres:
image: postgres:15
container_name: warbunny-db
restart: unless-stopped
environment:
POSTGRES_DB: warbunny
POSTGRES_USER: warbunny
POSTGRES_PASSWORD: ${DB_PASSWORD:-warbunny_secure_password}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- warbunny-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U warbunny"]
interval: 10s
timeout: 5s
retries: 5
# Optional: Redis for caching and sessions
redis:
image: redis:7-alpine
container_name: warbunny-redis
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis_data:/data
ports:
- "6379:6379"
networks:
- warbunny-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Optional: Nginx reverse proxy
nginx:
image: nginx:alpine
container_name: warbunny-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl:/etc/nginx/ssl:ro
depends_on:
- warbunny
networks:
- warbunny-net
networks:
warbunny-net:
driver: bridge
volumes:
warbunny_data:
warbunny_logs:
warbunny_reports:
postgres_data:
redis_data: