-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (51 loc) · 2.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (51 loc) · 2.13 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
services:
nullguard:
build: .
# Alternatively, use the pre-built image from Docker Hub instead of building locally:
# image: nullata/nullguard:latest
ports:
- "8080:8080"
# WireGuard UDP ports (add udp ports for each WireGuard server instance)
- "51820:51820/udp"
environment:
SERVER_PORT: "8080"
SERVER_SSL_ENABLED: ${SERVER_SSL_ENABLED:-false}
# --- Database: MySQL (default) ---
DB_HOST: ${DB_HOST:-localhost}
DB_PORT: ${DB_PORT:-3306}
DB_NAME: ${DB_NAME:-nullguard}
DB_USER: ${DB_USER:-nullguard}
DB_PASS: ${DB_PASS:-changeme}
# --- Database: SQLite (alternative, no MySQL server needed) ---
# To use SQLite instead of MySQL:
# 1. Comment out the DB_* variables above
# 2. Uncomment DB_TYPE and DATABASE_URL below
# 3. Uncomment the volumes section at the bottom of this file
# so the database file persists across container restarts
# DB_TYPE: sqlite
# DATABASE_URL: /data/nullguard.db
SESSION_SECRET_KEY: ${SESSION_SECRET_KEY:-}
WG_SERVER_DEFAULT_NAME: ${WG_SERVER_DEFAULT_NAME:-wg0}
WG_SERVER_DEFAULT_COMMENT: ${WG_SERVER_DEFAULT_COMMENT:-nullguard}
WG_SERVER_DEFAULT_ADDR: ${WG_SERVER_DEFAULT_ADDR:-10.252.0.1/24}
WG_SERVER_DEFAULT_PORT: ${WG_SERVER_DEFAULT_PORT:-51820}
WG_SERVER_DEFAULT_SUPERNET: ${WG_SERVER_DEFAULT_SUPERNET:-128.0.0.0/1, 0.0.0.0/1}
WG_SERVER_DEFAULT_KEEPALIVE: ${WG_SERVER_DEFAULT_KEEPALIVE:-30}
WG_SERVER_DEFAULT_CONF_PATH: ${WG_SERVER_DEFAULT_CONF_PATH:-/etc/wireguard}
WG_SERVER_CONF_PATH: ${WG_SERVER_CONF_PATH:-/etc/wireguard}
WG_CLIENT_DEFAULT_NAME: ${WG_CLIENT_DEFAULT_NAME:-my-wg-client}
AUTO_START_SERVERS: ${AUTO_START_SERVERS:-false}
COOKIE_SECURE: ${COOKIE_SECURE:-false}
SESSION_MAX_AGE: ${SESSION_MAX_AGE:-3600}
ENV: ${ENV:-production}
restart: unless-stopped
cap_add:
- NET_ADMIN
sysctls:
- net.ipv4.ip_forward=1
# Uncomment for SQLite (stores /data/nullguard.db in a named volume)
# volumes:
# - sqlite_data:/data
# Uncomment for SQLite
# volumes:
# sqlite_data: