Deployment with Docker and GitHub repo

I have an application on my personal VPS and it’s working just fine. However, I can’t figure out the proper way to update it when the code on my repo updates (just like it does when hosted via Streamlit Cloud).

As far as I understand, there is a way to make it update whenever there is a new commit to the master branch, however I can’t figure it out on my own… So, right now I just rebuild the image every time I need to update the app and it’s very inefficient and just feels very wrong.

Here’s my Dockerfile:

FROM python:3.9-slim

RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    software-properties-common \
    git \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /stapp

RUN git clone https://github.com/terrorChay/FESSBoard.git .

RUN pip3 install -r requirements.txt

EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

ENTRYPOINT ["streamlit", "run", "Dashboard.py", "--server.port=8501", "--server.address=0.0.0.0"]

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.