From b6d2cdeca35dd65ecad42163792ac91554a4bbea Mon Sep 17 00:00:00 2001 From: sclaw Date: Tue, 26 May 2026 16:44:42 +0000 Subject: [PATCH 1/2] update dockerfile dependencies --- Dockerfile | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 89d5e92..c7faed0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,22 @@ -FROM ubuntu:latest - -RUN apt-get update && apt-get install -y --no-install-recommends git curl ca-certificates r-base build-essential libxml2 libxml2-dev libfontconfig1-dev libtiff-dev libcurl4-openssl-dev libsodium-dev python3.12 python3.12-venv python3-pip +FROM ubuntu:24.04 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + curl \ + ca-certificates \ + r-base \ + build-essential \ + libxml2-dev \ + libfontconfig1-dev \ + libtiff-dev \ + libcurl4-openssl-dev \ + libsodium-dev \ + python3 \ + python3-venv \ + python3-pip \ + && rm -rf /var/lib/apt/lists/* WORKDIR /server @@ -11,6 +27,7 @@ ENV PATH="/root/.local/bin/:$PATH" # Install R dependencies RUN R -e "install.packages('renv', repos = c(CRAN = 'https://cloud.r-project.org'))" + COPY renv.lock renv.lock RUN mkdir -p renv COPY .Rprofile .Rprofile @@ -18,20 +35,17 @@ COPY renv/activate.R renv/activate.R COPY renv/settings.json renv/settings.json RUN R -e "renv::restore()" -# Install python dependencies +# Python deps COPY pyproject.toml uv.lock ./ RUN uv venv .venv RUN uv sync --frozen --no-install-project -# Copy project files +# Copy project COPY . . -# Install the app +# Install app RUN uv pip install -e . -# Expose port EXPOSE 80 -# Start the server -CMD uv run hydroshift/add_analytics.py && uv run streamlit run hydroshift/streamlit_app.py \ - --server.port=80 --server.address=0.0.0.0 --server.headless=true +CMD ["bash", "-c", "uv run hydroshift/add_analytics.py && uv run streamlit run hydroshift/streamlit_app.py --server.port=80 --server.address=0.0.0.0 --server.headless=true"] From fe8ea275d774c72ea22e046ad3260b18c0d1f59b Mon Sep 17 00:00:00 2001 From: sclaw Date: Tue, 26 May 2026 16:47:58 +0000 Subject: [PATCH 2/2] trigger PR check on dockerfile changes --- .github/workflows/pr-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml index e742487..474315f 100644 --- a/.github/workflows/pr-check.yaml +++ b/.github/workflows/pr-check.yaml @@ -10,6 +10,7 @@ on: - '.dockerignore' - '.github/workflows/**' - 'pyproject.toml' + - 'Dockerfile' permissions: contents: read