fix: error on startup regarding oidc config file being weird
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:
DaanSelen
2026-02-23 16:35:27 +01:00
parent bb18c55003
commit e71179a2d4
3 changed files with 18 additions and 1 deletions

View File

@@ -124,6 +124,7 @@ RUN mkdir /data /configs -p ${WGDASH}/src /etc/amnezia/amneziawg \
COPY ./src ${WGDASH}/src
COPY --from=pip-builder /opt/wgdashboard/src/venv /opt/wgdashboard/src/venv
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 ./docker/entrypoint.sh /entrypoint.sh

View File

@@ -122,7 +122,7 @@ ensure_installation() {
# PERSISTENCE FOR wg-dashboard-oidc-providers.json
if [ ! -f "/data/wg-dashboard-oidc-providers.json" ]; then
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
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."

View File

@@ -0,0 +1,16 @@
{
"Admin": {
"Provider": {
"client_id": "",
"client_secret": "",
"issuer": ""
}
},
"Client": {
"Provider": {
"client_id": "",
"client_secret": "",
"issuer": ""
}
}
}