2024-02-14 16:36:01 -03:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
wireguard-webadmin:
|
|
|
|
container_name: wireguard-webadmin
|
2024-02-16 11:59:03 -03:00
|
|
|
restart: unless-stopped
|
2024-02-14 16:36:01 -03:00
|
|
|
build:
|
|
|
|
context: .
|
2024-02-16 11:59:03 -03:00
|
|
|
environment:
|
|
|
|
- SERVER_ADDRESS=${SERVER_ADDRESS}
|
|
|
|
- DEBUG_MODE=${DEBUG_MODE}
|
2024-02-14 16:36:01 -03:00
|
|
|
volumes:
|
|
|
|
- wireguard:/etc/wireguard
|
|
|
|
- static_volume:/app_static_files/
|
|
|
|
ports:
|
2024-02-15 22:20:44 -03:00
|
|
|
# Do not directly expose the Django port to the internet, use the reverse proxy below instead
|
2024-02-16 11:59:03 -03:00
|
|
|
#- "127.0.0.1:8000:8000"
|
2024-02-15 22:20:44 -03:00
|
|
|
# dont go crazy increasing the udp port range. Docker will have a hard time handling with a large range of ports
|
|
|
|
# Actually, you probably will use only one port, but you can add more server instances if you want
|
2024-02-14 16:36:01 -03:00
|
|
|
- "51820-51839:51820-51839/udp"
|
2024-02-15 22:20:44 -03:00
|
|
|
|
2024-02-14 16:36:01 -03:00
|
|
|
cap_add:
|
|
|
|
- NET_ADMIN
|
|
|
|
- SYS_MODULE
|
|
|
|
sysctls:
|
|
|
|
- net.ipv4.conf.all.src_valid_mark=1
|
|
|
|
- net.ipv4.ip_forward=1
|
|
|
|
command: /bin/bash /app/init.sh
|
|
|
|
|
|
|
|
nginx:
|
|
|
|
container_name: wireguard-webadmin-nginx
|
2024-02-16 11:59:03 -03:00
|
|
|
restart: unless-stopped
|
2024-02-14 16:36:01 -03:00
|
|
|
image: nginx:alpine
|
|
|
|
volumes:
|
|
|
|
- ./virtualhost.conf:/etc/nginx/conf.d/wireguard-webadmin.conf
|
|
|
|
- static_volume:/static
|
|
|
|
- https_cert:/certificate
|
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
static_volume:
|
|
|
|
https_cert:
|
|
|
|
wireguard:
|