Added healthcheck for editor with https (#13947)

Added a fix for the docker health check on editor with ssl enabled for appsmith-ce fat container and the slim client appsmith-editor
This commit is contained in:
Sumesh Pradhan 2022-05-27 17:05:21 +05:30 committed by GitHub
parent 39b071961a
commit 31c98a8fda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,4 @@
FROM nginx:1.20-alpine
COPY ./build /var/www/appsmith
@ -16,5 +17,5 @@ COPY ./docker/templates/nginx-app-https.conf.template /nginx-app-https.conf.temp
# This is the script that is used to start Nginx when the Docker container starts
COPY ./docker/start-nginx.sh /start-nginx.sh
HEALTHCHECK --interval=15s --timeout=15s --start-period=15s --retries=3 CMD curl -f http://localhost:80/ || exit 1
HEALTHCHECK --interval=15s --timeout=15s --start-period=15s --retries=3 CMD curl -Lfk http://localhost/ || exit 1
CMD ["/start-nginx.sh"]

View File

@ -11,9 +11,9 @@ while read -r line
else
echo "PROCESS: $process - STATUS: $status"
if [[ "$process" == 'editor' ]]; then
if [[ $(curl -s -w "%{http_code}\n" http://localhost:80/ -o /dev/null) -ne 200 ]]; then
echo 'ERROR: Editor is down';
healthy=false
if [[ $(curl -Lfk -s -w "%{http_code}\n" http://localhost/ -o /dev/null) -ne 200 ]]; then
echo 'ERROR: Editor is down';
healthy=false
fi
elif [[ "$process" == "server" ]]; then
if [[ $(curl -s -w "%{http_code}\n" http://localhost:8080/api/v1/users/me/ -o /dev/null) -ne 200 ]]; then