mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 15:20:09 +01:00
working tests
This commit is contained in:
parent
9dd9be3b8c
commit
d4819b13eb
@ -1,4 +1,3 @@
|
|||||||
# Pull from small Debian stable image.
|
|
||||||
FROM alpine:latest AS build
|
FROM alpine:latest AS build
|
||||||
LABEL maintainer="dselen@nerthus.nl"
|
LABEL maintainer="dselen@nerthus.nl"
|
||||||
|
|
||||||
@ -27,7 +26,6 @@ ENV WGDASH=/opt/wireguarddashboard
|
|||||||
# Doing WireGuard Dashboard installation measures. Modify the git clone command to get the preferred version, with a specific branch for example.
|
# Doing WireGuard Dashboard installation measures. Modify the git clone command to get the preferred version, with a specific branch for example.
|
||||||
RUN mkdir -p /setup/conf && mkdir /setup/app && mkdir ${WGDASH}
|
RUN mkdir -p /setup/conf && mkdir /setup/app && mkdir ${WGDASH}
|
||||||
COPY ./src /setup/app/src
|
COPY ./src /setup/app/src
|
||||||
#COPY src /setup/app/src
|
|
||||||
|
|
||||||
# Set the volume to be used for WireGuard configuration persistency.
|
# Set the volume to be used for WireGuard configuration persistency.
|
||||||
VOLUME /etc/wireguard
|
VOLUME /etc/wireguard
|
||||||
@ -46,15 +44,13 @@ PreDown = iptables -t nat -D POSTROUTING -s ${wg_net}/24 -o ${out_adapt} -j MASQ
|
|||||||
PreDown = iptables -D FORWARD -i wg0 -o wg0 -j DROP\n\
|
PreDown = iptables -D FORWARD -i wg0 -o wg0 -j DROP\n\
|
||||||
ListenPort = ${wg_port}\n\
|
ListenPort = ${wg_port}\n\
|
||||||
SaveConfig = true\n\
|
SaveConfig = true\n\
|
||||||
DNS = ${global_dns}" > /setup/conf/wg0.conf
|
DNS = ${global_dns}" > /setup/conf/wg0.conf \
|
||||||
|
&& chmod 600 /setup/conf/wg0.conf
|
||||||
|
|
||||||
|
|
||||||
# Defining a way for Docker to check the health of the container. In this case: checking the login URL.
|
# 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 \
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||||
CMD sh -c 'pgrep gunicorn > /dev/null && pgrep tail > /dev/null' || exit 1
|
CMD sh -c 'pgrep gunicorn > /dev/null && pgrep tail > /dev/null' || exit 1
|
||||||
|
|
||||||
|
|
||||||
# Copy the basic entrypoint.sh script.
|
# Copy the basic entrypoint.sh script.
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ ensure_installation() {
|
|||||||
|
|
||||||
# This first step is to ensure the wg0.conf file exists, and if not, then its copied over from the ephemeral container storage.
|
# This first step is to ensure the wg0.conf file exists, and if not, then its copied over from the ephemeral container storage.
|
||||||
if [ ! -f "/etc/wireguard/wg0.conf" ]; then
|
if [ ! -f "/etc/wireguard/wg0.conf" ]; then
|
||||||
echo "Standard wg0 Configuration file not found, grabbing template."
|
echo "Standard wg0 Configuration file not found, grabbing template. And adjusting permissions."
|
||||||
cp "/setup/conf/wg0.conf" "/etc/wireguard/wg0.conf"
|
cp -a "/setup/conf/wg0.conf" "/etc/wireguard/wg0.conf"
|
||||||
|
|
||||||
echo "Setting a secure private key."
|
echo "Setting a secure private key."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user