Skip to content

Commit

Permalink
Fix Docker container healthcheck with Caddy reverse-proxying
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanjli committed Apr 29, 2024
1 parent 50735b2 commit 7234dc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

# Run the Streamlit app
ENTRYPOINT ["streamlit", "run", "app_model.py", "--server.port=8501", "--server.address=::", "--server.headless=true"]
ENTRYPOINT ["streamlit", "run", "app_model.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless=true"]
2 changes: 2 additions & 0 deletions pkg/compose-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
caddy.handle_path.reverse_proxy: "{{upstreams 8501}}"
environment:
STREAMLIT_SERVER_BASE_URL_PATH: /ps/streamlit-demo
healthcheck:
test: curl --fail http://localhost:8501/ps/streamlit-demo/_stcore/health || exit 1

networks:
caddy-ingress:
Expand Down

0 comments on commit 7234dc0

Please sign in to comment.