Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Healthchek failing if 'domain' is set in config.json #925

Closed
andpp opened this issue Mar 24, 2020 · 1 comment · Fixed by #927
Closed

Healthchek failing if 'domain' is set in config.json #925

andpp opened this issue Mar 24, 2020 · 1 comment · Fixed by #927

Comments

@andpp
Copy link

andpp commented Mar 24, 2020

Subject of the issue

healthcheck.sh script does not aware of 'domain' setting and HEALTHCHECK will fail if subfolder is used.

Your environment

  • Bitwarden_rs version: 1.14.1
  • Install method: Docker

Proposed Fix

Temporary I use this healthcheck.sh. It works for my setting but I as I am not familiar with the server internals, am not sure it will work for all possible variants for defining domain.

My domain definition from config.json. I do not use DOMAIN variable

"domain" : "https://my.server/bw_subfolder/",

#!/usr/bin/env sh

DM="$(cat /data/config.json | grep domain | sed -n 's|.*http.*/\(.*\)/.*|\1|p')"
if [ ! -z "$DM" ]
then
   DM="/$DM"
fi

if [ -z "$ROCKET_TLS"]
then
  curl --fail http://localhost:${ROCKET_PORT:-"80"}$DM/alive || exit 1
else
  curl --insecure --fail https://localhost:${ROCKET_PORT:-"80"}$DM/alive || exit 1
fi
@jjlin
Copy link
Contributor

jjlin commented Mar 24, 2020

Sorry, overlooked this aspect when implementing the subpath stuff. I'll work on a fix later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants