mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-04-19 00:45:16 +00:00
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
version: '3'
|
|
services:
|
|
wireguard-webadmin:
|
|
container_name: wireguard-webadmin
|
|
restart: unless-stopped
|
|
build:
|
|
context: .
|
|
environment:
|
|
- SERVER_ADDRESS=${SERVER_ADDRESS}
|
|
- DEBUG_MODE=${DEBUG_MODE}
|
|
volumes:
|
|
- wireguard:/etc/wireguard
|
|
- static_volume:/app_static_files/
|
|
ports:
|
|
# Do not directly expose the Django port to the internet, use the reverse proxy below instead
|
|
# - "127.0.0.1:8000:8000"
|
|
# Warning: Docker will have a hard time handling large amount of ports. Expose only the ports that you need.
|
|
# Ports for multiple WireGuard instances. (Probably, you just need one)
|
|
- "51820-51839:51820-51839/udp"
|
|
# Ports for port forwarding rules. Add your own ports here if you need them.
|
|
- "8080-8089:8080-8089/tcp"
|
|
|
|
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
|
|
|
|
wireguard-webadmin-cron:
|
|
container_name: wireguard-webadmin-cron
|
|
restart: unless-stopped
|
|
build:
|
|
context: ./cron
|
|
dockerfile: Dockerfile-cron
|
|
depends_on:
|
|
- wireguard-webadmin
|
|
|
|
nginx:
|
|
container_name: wireguard-webadmin-nginx
|
|
restart: unless-stopped
|
|
image: nginx:alpine
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile_nginx
|
|
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:
|