1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-06 07:50:13 +01:00

Persistency seems to work with this model, it has succeeded my tests.

This commit is contained in:
Daan 2024-06-04 23:26:03 +02:00
parent 0938f5ab71
commit 560096878f
3 changed files with 9 additions and 3 deletions

View File

@ -20,7 +20,7 @@ RUN ln -sf /usr/share/zoneinfo/${tz} /etc/localtime \
# Removing the linux-image package to preserve space on the container.
# Installing needed packages for installation.
RUN apt-get install -y --no-install-recommends git wireguard wireguard-tools python3 python3-pip python3-venv iproute2 openresolv procps iptables curl
RUN apt-get install -y --no-install-recommends git wireguard wireguard-tools python3 python3-pip python3-venv iproute2 openresolv procps iptables curl iputils-ping traceroute
ENV WGDASH=/opt/wireguardashboard
RUN python3 -m venv ${WGDASH}/venv

View File

@ -4,6 +4,7 @@ services:
restart: unless-stopped
container_name: wire-dash
environment:
#- global_dns=8.8.8.8
#- tz=Europe/Amsterdam # <--- is default
- public_ip=212.124.66.17
ports:
@ -11,8 +12,10 @@ services:
- 51820:51820/udp
volumes:
- wireguard_confs:/etc/wireguard
- wireguard_app:/opt/wireguardashboard/app
cap_add:
- NET_ADMIN
volumes:
wireguard_confs:
wireguard_app:

View File

@ -1,4 +1,7 @@
echo "Starting the WireGuard Dashboard."
echo "\nStarting the WireGuard Dashboard."
# Cleaning out previous data such as the .pid file.
rm /opt/wireguardashboard/app/src/gunicorn.pid
# Starting the WireGuard Dashboard Web-UI.
. ${WGDASH}/venv/bin/activate
@ -23,7 +26,7 @@ else
fi
sleep 3s
tail -f /opt/wireguardashboard/app/src/log/*.log
tail -f $(ls -t /opt/wireguardashboard/app/src/log/error_*.log | head -n 1)
# Blocking command in case of erroring.
sleep infinity