mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2026-02-28 19:46:17 +00:00
fix: error on startup regarding oidc config file being weird
This commit is contained in:
@@ -124,6 +124,7 @@ RUN mkdir /data /configs -p ${WGDASH}/src /etc/amnezia/amneziawg \
|
|||||||
COPY ./src ${WGDASH}/src
|
COPY ./src ${WGDASH}/src
|
||||||
COPY --from=pip-builder /opt/wgdashboard/src/venv /opt/wgdashboard/src/venv
|
COPY --from=pip-builder /opt/wgdashboard/src/venv /opt/wgdashboard/src/venv
|
||||||
COPY ./docker/wg0.conf.template /tmp/wg0.conf.template
|
COPY ./docker/wg0.conf.template /tmp/wg0.conf.template
|
||||||
|
COPY ./docker/wg-dashboard-oidc-providers.json.template /tmp/wg-dashboard-oidc-providers.json.template
|
||||||
# Copy in the runtime script, essential.
|
# Copy in the runtime script, essential.
|
||||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ ensure_installation() {
|
|||||||
# PERSISTENCE FOR wg-dashboard-oidc-providers.json
|
# PERSISTENCE FOR wg-dashboard-oidc-providers.json
|
||||||
if [ ! -f "/data/wg-dashboard-oidc-providers.json" ]; then
|
if [ ! -f "/data/wg-dashboard-oidc-providers.json" ]; then
|
||||||
echo "Creating wg-dashboard-oidc-providers.json file"
|
echo "Creating wg-dashboard-oidc-providers.json file"
|
||||||
touch "/data/wg-dashboard-oidc-providers.json"
|
cp -v /tmp/wg-dashboard-oidc-providers.json.template /data/wg-dashboard-oidc-providers.json
|
||||||
fi
|
fi
|
||||||
if [[ ! -L "${WGDASH}/src/wg-dashboard-oidc-providers.json" ]] && [[ -f "${WGDASH}/src/wg-dashboard-oidc-providers.json" ]]; then
|
if [[ ! -L "${WGDASH}/src/wg-dashboard-oidc-providers.json" ]] && [[ -f "${WGDASH}/src/wg-dashboard-oidc-providers.json" ]]; then
|
||||||
echo "Removing ${WGDASH}/src/wg-dashboard-oidc-providers.json since its not a symbolic link."
|
echo "Removing ${WGDASH}/src/wg-dashboard-oidc-providers.json since its not a symbolic link."
|
||||||
|
|||||||
16
docker/wg-dashboard-oidc-providers.json.template
Normal file
16
docker/wg-dashboard-oidc-providers.json.template
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"Admin": {
|
||||||
|
"Provider": {
|
||||||
|
"client_id": "",
|
||||||
|
"client_secret": "",
|
||||||
|
"issuer": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Client": {
|
||||||
|
"Provider": {
|
||||||
|
"client_id": "",
|
||||||
|
"client_secret": "",
|
||||||
|
"issuer": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user