mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2026-04-10 14:56:18 +00:00
chore: add the option for docker to not be dominant
This commit is contained in:
@@ -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 \
|
||||||
|
|||||||
@@ -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 NAT’d. |
|
| `public_ip` | Public IP address | Retrieved automatically | `253.162.134.73` | Used to generate accurate client configs. Needed if container is NAT’d. |
|
||||||
|
|||||||
@@ -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:"
|
||||||
|
|||||||
Reference in New Issue
Block a user