diff --git a/docker/Dockerfile b/docker/Dockerfile index 3c6a800..9441739 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 diff --git a/docker/compose.yaml b/docker/compose.yaml index 3b6ca95..e900be2 100644 --- a/docker/compose.yaml +++ b/docker/compose.yaml @@ -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: \ No newline at end of file diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 1009e56..3d0ce59 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -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 \ No newline at end of file