From e7562db9bc80e4325e9d88aa37a6ae408e24e5c2 Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Sun, 30 Mar 2025 18:46:52 -0400 Subject: [PATCH] Update hashes, blog, version --- Dockerfile | 87 ++++++++++++------- i2p2www/__init__.py | 2 +- ....2-Release.draft.rst => 2.8.2-Release.rst} | 0 i2p2www/pages/downloads/macros | 8 +- 4 files changed, 60 insertions(+), 37 deletions(-) rename i2p2www/blog/2025/03/29/{2.8.2-Release.draft.rst => 2.8.2-Release.rst} (100%) diff --git a/Dockerfile b/Dockerfile index 682aab6f..75787689 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,41 +1,64 @@ +FROM debian:oldoldstable as builder +ENV SERVERNAME=geti2p.net \ + SERVERMAIL=example@geti2p.net + +# Install only build dependencies first +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + python2-dev \ + python-pip \ + patch \ + python-virtualenv \ + git \ + python-polib && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /build + +# Copy dependency files first for better layer caching +COPY etc/reqs.txt etc/ +COPY etc/multi-domain.patch etc/ + +# Setup virtual environment and install dependencies +RUN virtualenv --distribute env && \ + . env/bin/activate && \ + pip install -r etc/reqs.txt + +# Now copy the rest of the application +COPY . . + +# Build steps in a single layer +RUN . env/bin/activate && \ + patch -p0 -N -r - < etc/multi-domain.patch && \ + ./compile-messages.sh && \ + echo "Git revision: $(git log -n 1 | grep commit | sed 's/commit //' | sed 's/ .*$//')" > ./i2p2www/pages/include/mtnversion + +# Start second stage with same old base image FROM debian:oldoldstable -ENV SERVERNAME=geti2p.net -ENV SERVERMAIL=example@geti2p.net + +# Install only runtime dependencies +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + apache2 \ + apache2-utils \ + libapache2-mod-wsgi \ + python2-minimal && \ + rm -rf /var/lib/apt/lists/* WORKDIR /var/www/i2p.www - ## Install the dependencies -#RUN #grep -v security.debian /etc/apt/sources.list > /etc/apt/sources.list.bak && \ - #grep -v stretch-updates /etc/apt/sources.list.bak > /etc/apt/sources.list && \ -RUN apt-get update && \ - apt-get -y install apache2 apache2-utils libapache2-mod-wsgi python2-dev python-pip patch python-virtualenv git python-polib +# Copy built artifacts +COPY --from=builder /build /var/www/i2p.www +COPY --from=builder /build/env /var/www/env -ADD . /var/www/i2p.www - - ## Start setting up the site -RUN rm -rfv env && \ - virtualenv --distribute env && \ - . env/bin/activate && \ - pip install -r etc/reqs.txt && \ - patch -p0 -N -r -