Skip to content

Commit

Permalink
healthcheck frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
John Dutchover committed Dec 11, 2023
1 parent 33baa3d commit a2e8be4
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
FROM python:3.11.4-slim-bookworm
# Use an official Python runtime as a parent image
FROM python:3.11.6-slim-bookworm

# Set the working directory in the Docker image
WORKDIR /client
ENV PYTHONPATH /client

# Copy the requirements.txt first to leverage Docker cache
COPY frontend/requirements_frontend.txt /client/requirements_frontend.txt
COPY frontend/start_streamlit.sh /client/start_streamlit.sh

RUN chmod +x /client/start_streamlit.sh
RUN pip install --no-cache-dir -r requirements_frontend.txt

# Copy the app directory contents into the container at /client/frontend
COPY frontend/ .

# Make port 8501 available to the world outside this container
EXPOSE 8501

HEALTHCHECK --interval=5m --timeout=3s \
--start-period=1m \
CMD curl --fail http://localhost:8501 || exit 1


# Run startup script
ENTRYPOINT ["bash", "start_streamlit.sh"]

0 comments on commit a2e8be4

Please sign in to comment.