chore: add the option for docker to not be dominant
Some checks failed
Docker Build and Push / docker_build (push) Has been cancelled
Docker Build and Push / docker_scan (push) Has been cancelled

This commit is contained in:
Daan Selen
2026-03-16 19:02:51 +01:00
parent eeedf705aa
commit f58226e398
3 changed files with 6 additions and 3 deletions

View File

@@ -114,7 +114,8 @@ ENV TZ="Europe/Amsterdam" \
global_dns="9.9.9.9" \ global_dns="9.9.9.9" \
wgd_port="10086" \ wgd_port="10086" \
public_ip="" \ public_ip="" \
WGDASH=/opt/wgdashboard WGDASH=/opt/wgdashboard \
dynamic_config="true"
# Create directories needed for operation # Create directories needed for operation
RUN mkdir /data /configs -p ${WGDASH}/src /etc/amnezia/amneziawg \ RUN mkdir /data /configs -p ${WGDASH}/src /etc/amnezia/amneziawg \

View File

@@ -97,6 +97,7 @@ Updating the WGDashboard container should be through 'The Docker Way' - by pulli
| Variable | Accepted Values | Default | Example | Description | | Variable | Accepted Values | Default | Example | Description |
| ------------------ | ---------------------------------------- | ----------------------- | --------------------- | ----------------------------------------------------------------------- | | ------------------ | ---------------------------------------- | ----------------------- | --------------------- | ----------------------------------------------------------------------- |
| `dynamic_config` | true, yes, false, no | `true` | `true` or `no` | Turns on or off the dynamic configuration feature, on by default for Docker |
| `tz` | Timezone | `Europe/Amsterdam` | `America/New_York` | Sets the container's timezone. Useful for accurate logs and scheduling. | | `tz` | Timezone | `Europe/Amsterdam` | `America/New_York` | Sets the container's timezone. Useful for accurate logs and scheduling. |
| `global_dns` | IPv4 and IPv6 addresses | `9.9.9.9` | `8.8.8.8`, `1.1.1.1` | Default DNS for WireGuard clients. | | `global_dns` | IPv4 and IPv6 addresses | `9.9.9.9` | `8.8.8.8`, `1.1.1.1` | Default DNS for WireGuard clients. |
| `public_ip` | Public IP address | Retrieved automatically | `253.162.134.73` | Used to generate accurate client configs. Needed if container is NATd. | | `public_ip` | Public IP address | Retrieved automatically | `253.162.134.73` | Used to generate accurate client configs. Needed if container is NATd. |

View File

@@ -85,8 +85,6 @@ echo "------------------------- START ----------------------------"
echo "Starting the WGDashboard Docker container." echo "Starting the WGDashboard Docker container."
ensure_installation() { ensure_installation() {
echo "Quick-installing..."
# Make the wgd.sh script executable. # Make the wgd.sh script executable.
chmod +x "${WGDASH}"/src/wgd.sh chmod +x "${WGDASH}"/src/wgd.sh
cd "${WGDASH}"/src || exit cd "${WGDASH}"/src || exit
@@ -170,6 +168,9 @@ set_envvars() {
# Check if config file is empty # Check if config file is empty
if [ ! -s "${config_file}" ]; then if [ ! -s "${config_file}" ]; then
echo "Config file is empty. Creating initial structure." echo "Config file is empty. Creating initial structure."
elif [[ ${dynamic_config,,} =~ ^(false|no)$ ]]; then
echo "Dynamic configuration feature turned off, not changing anything"
return
fi fi
echo "Checking basic configuration:" echo "Checking basic configuration:"