Skip to content

Commit

Permalink
fix sends folder name, direct validated config to /dev/null since we …
Browse files Browse the repository at this point in the history
…dont want to reveal secrets, dont set ADMIN_TOKEN, its not actually needed (the config was just invalid and so it was ignored)
  • Loading branch information
NiklasRosenstein committed Oct 11, 2024
1 parent fa62a14 commit 582424c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vaultwarden-fly-io/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ openssl rsa -in /data/rsa_key.pem -pubout >/data/rsa_key.pub.pem
VAULTWARDEN_CONFIG_PATH=/data/config.json
VAULTWARDEN_DOMAIN="${VAULTWARDEN_DOMAIN:-https://${FLY_APP_NAME}.fly.dev}"
assert_is_set VAULTWARDEN_ADMIN_TOKEN
# NOTE: This actually must be set as a variable to enable the admin panel in the first place.
export ADMIN_TOKEN="${VAULTWARDEN_ADMIN_TOKEN}"

cat <<EOF >$VAULTWARDEN_CONFIG_PATH
{
Expand All @@ -135,7 +133,7 @@ cat <<EOF >$VAULTWARDEN_CONFIG_PATH
"enable_db_wal": true,
"attachments_folder": "/mnt/s3/attachments",
"icon_cache_folder": "/mnt/s3/icon_cache",
"sends_folder": "/mnt/s3/sends_folder",
"sends_folder": "/mnt/s3/sends",
"domain": "${VAULTWARDEN_DOMAIN}",
"sends_allowed": ${VAULTWARDEN_SENDS_ALLOWED:-true},
"hibp_api_key": "${VAULTWARDEN_HIBP_API_KEY:-}",
Expand Down Expand Up @@ -213,7 +211,7 @@ chmod -w $VAULTWARDEN_CONFIG_PATH
# Validate the JSON file syntax. This is a sanity check that should prevent successful startup if we made a mistake
# in the JSON snytax, as Vaultwarden will not complain and simply not load the file.
info "validating $VAULTWARDEN_CONFIG_PATH syntax"
if ! jq < $VAULTWARDEN_CONFIG_PATH; then
if ! jq < $VAULTWARDEN_CONFIG_PATH >/dev/null; then
error "we made a mistake in $VAULTWARDEN_CONFIG_PATH, please file a bug report"
exit 1
fi
Expand Down

0 comments on commit 582424c

Please sign in to comment.