Added Auto Config Creation

Reimplemented Automatic Wireguard Configuration Generation

Setting global Env Vars via the docker image build is still insecure, better to pass to dashboard before init.
This commit is contained in:
Noxcis
2024-08-23 16:49:54 -05:00
parent acf4f3fbf0
commit 2d5796d161
6 changed files with 96 additions and 24 deletions

View File

@@ -3,22 +3,22 @@ FROM alpine:latest
LABEL maintainer="dselen@nerthus.nl"
ENV PYTHONPATH="/usr/bin/python"
WORKDIR /home/app
WORKDIR /opt/wireguarddashboard/src
RUN apk update && \
apk add --no-cache py3-bcrypt py3-psutil && \
apk add --no-cache wireguard-tools && \
apk add --no-cache net-tools iproute2 iptables ip6tables && \
apk add --no-cache inotify-tools procps openresolv && \
mkdir /home/app/master-key
mkdir /opt/wireguarddashboard/src/master-key
COPY ./src /home/app
COPY ./docker/wgd.sh /home/app/
COPY ./docker/requirements.txt /home/app/
COPY ./src /opt/wireguarddashboard/src/
COPY ./docker/wgd.sh /opt/wireguarddashboard/src/
COPY ./docker/requirements.txt /opt/wireguarddashboard/src/
RUN chmod u+x /home/app/entrypoint.sh
RUN chmod u+x /opt/wireguarddashboard/src/entrypoint.sh
# Defining a way for Docker to check the health of the container. In this case: checking the login URL.
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD curl -f http://localhost:10086/signin || exit 1
ENTRYPOINT ["/home/app/entrypoint.sh"]
ENTRYPOINT ["/opt/wireguarddashboard/src/entrypoint.sh"]