Originally created by @andpp on GitHub (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
#!/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
Originally created by @andpp on GitHub (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
<!-- The version number, obtained from the logs or the admin page -->
* Bitwarden_rs version: 1.14.1
<!-- How the server was installed: Docker image / package / built from source -->
* 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
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @andpp on GitHub (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
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/",
@jjlin commented on GitHub (Mar 24, 2020):
Sorry, overlooked this aspect when implementing the subpath stuff. I'll work on a fix later today.