From 50c31b93a637fd552c63a56438401b72dacf4771 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 23 Oct 2024 10:26:33 +0200 Subject: [PATCH 1/6] push to 2.0.0 --- Containerfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Containerfile b/Containerfile index 3c022cd..19815b3 100644 --- a/Containerfile +++ b/Containerfile @@ -1,4 +1,4 @@ -FROM docker.io/alpine:3.19 AS builder +FROM docker.io/alpine:3.20 AS builder ENV POETRY_VIRTUALENVS_IN_PROJECT=true ENV POETRY_NO_INTERACTION=1 @@ -22,14 +22,14 @@ RUN apk --no-cache add \ sed \ libffi-dev -ENV VERSION=13edefbf4168ee56f12a1ab5d9d1358094772b09 +ENV VERSION=v2.0.0 RUN git clone https://github.com/mealie-recipes/mealie.git WORKDIR /mealie RUN git checkout $VERSION RUN poetry install -E pgsql --only main RUN find .venv/bin -type f -exec grep -lZ "^#!/mealie/.venv/bin/python" {} + | xargs -0 -I {} sed -i "1s|^#!/mealie/.venv/bin/python|#!/py-pkgs/bin/python|" {} -RUN echo "/home/mealie/app/" > /mealie/.venv/lib/python3.11/site-packages/mealie.pth +RUN echo "/home/mealie/app/" > /mealie/.venv/lib/python3.12/site-packages/mealie.pth WORKDIR /mealie/frontend RUN yarn install \ @@ -41,7 +41,7 @@ RUN yarn install \ --ignore-engines RUN echo "n" | yarn generate -FROM docker.io/alpine:3.19 as crfpp +FROM docker.io/alpine:3.20 as crfpp ENV VERSION=c56dd9f29469c8a9f34456b8c0d6ae0476110516 @@ -60,7 +60,7 @@ RUN ./configure --prefix=/ RUN make RUN make DESTDIR=/dist install -FROM docker.io/alpine:3.19 +FROM docker.io/alpine:3.20 ENV PRODUCTION=true ENV TESTING=false @@ -75,14 +75,12 @@ RUN apk add --no-cache \ python3 \ libldap \ zlib \ - jpeg \ - py3-gunicorn + jpeg COPY --from=crfpp /dist/bin /bin/ COPY --from=crfpp /dist/lib /lib/ COPY --from=builder --chown=mealie:mealie /mealie/.venv /py-pkgs COPY --from=builder --chown=mealie:mealie /mealie/mealie /home/mealie/app/mealie -COPY --from=builder --chown=mealie:mealie /mealie/gunicorn_conf.py /home/mealie/app/gunicorn_conf.py COPY --from=builder --chown=mealie:mealie /mealie/alembic.ini /home/mealie/app/alembic.ini COPY --from=builder --chown=mealie:mealie /mealie/alembic /home/mealie/app/alembic COPY --from=builder --chown=mealie:mealie /mealie/frontend/dist /home/mealie/app/static @@ -96,6 +94,9 @@ USER mealie RUN /py-pkgs/bin/python /home/mealie/app/mealie/scripts/install_model.py +ENV APP_PORT=9000 +ENV HOST=0.0.0.0 + EXPOSE 9000 VOLUME ["/app/data"] -CMD ["uvicorn", "mealie.app:app", "--host", "0.0.0.0", "--port", "9000"] +CMD ["python3", "mealie/main.py"] From cddf5597d6a80d6b34c34ce67cf03aa71e8315ed Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 23 Oct 2024 10:59:35 +0200 Subject: [PATCH 2/6] push to 2.0.0 --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 19815b3..36417b9 100644 --- a/Containerfile +++ b/Containerfile @@ -99,4 +99,4 @@ ENV HOST=0.0.0.0 EXPOSE 9000 VOLUME ["/app/data"] -CMD ["python3", "mealie/main.py"] +CMD ["/py-pkgs/bin/python", "mealie/main.py"] From 571c36b7e259d7397e5f7c32742087cf192b1b34 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Fri, 1 Nov 2024 10:10:59 +0100 Subject: [PATCH 3/6] push to 2.1.0 --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 36417b9..6960553 100644 --- a/Containerfile +++ b/Containerfile @@ -22,7 +22,7 @@ RUN apk --no-cache add \ sed \ libffi-dev -ENV VERSION=v2.0.0 +ENV VERSION=v2.1.0 RUN git clone https://github.com/mealie-recipes/mealie.git WORKDIR /mealie From d4d8857899d7f3ec0efb01b239d97f552ee16b4c Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 27 Nov 2024 11:40:54 +0100 Subject: [PATCH 4/6] push to 2.3.0 --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 6960553..261e2a5 100644 --- a/Containerfile +++ b/Containerfile @@ -22,7 +22,7 @@ RUN apk --no-cache add \ sed \ libffi-dev -ENV VERSION=v2.1.0 +ENV VERSION=v2.3.0 RUN git clone https://github.com/mealie-recipes/mealie.git WORKDIR /mealie From e2ce7ed14a54fcc58a3b21ce03c86fa0b65c2b2f Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Fri, 10 Jan 2025 16:08:37 +0100 Subject: [PATCH 5/6] push to 2.4.2 --- Containerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Containerfile b/Containerfile index 261e2a5..fe5a3e3 100644 --- a/Containerfile +++ b/Containerfile @@ -1,4 +1,4 @@ -FROM docker.io/alpine:3.20 AS builder +FROM docker.io/alpine:3.21 AS builder ENV POETRY_VIRTUALENVS_IN_PROJECT=true ENV POETRY_NO_INTERACTION=1 @@ -22,7 +22,7 @@ RUN apk --no-cache add \ sed \ libffi-dev -ENV VERSION=v2.3.0 +ENV VERSION=v2.4.2 RUN git clone https://github.com/mealie-recipes/mealie.git WORKDIR /mealie @@ -60,7 +60,7 @@ RUN ./configure --prefix=/ RUN make RUN make DESTDIR=/dist install -FROM docker.io/alpine:3.20 +FROM docker.io/alpine:3.21 ENV PRODUCTION=true ENV TESTING=false @@ -81,8 +81,6 @@ COPY --from=crfpp /dist/bin /bin/ COPY --from=crfpp /dist/lib /lib/ COPY --from=builder --chown=mealie:mealie /mealie/.venv /py-pkgs COPY --from=builder --chown=mealie:mealie /mealie/mealie /home/mealie/app/mealie -COPY --from=builder --chown=mealie:mealie /mealie/alembic.ini /home/mealie/app/alembic.ini -COPY --from=builder --chown=mealie:mealie /mealie/alembic /home/mealie/app/alembic COPY --from=builder --chown=mealie:mealie /mealie/frontend/dist /home/mealie/app/static RUN mkdir -p /app/data From 5ac5c1693752fac8d029c20509328b998cc7e861 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Thu, 24 Apr 2025 11:03:32 +0200 Subject: [PATCH 6/6] push to 2.8.0 --- Containerfile | 51 ++++++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/Containerfile b/Containerfile index fe5a3e3..e16ea67 100644 --- a/Containerfile +++ b/Containerfile @@ -8,7 +8,6 @@ ENV PIP_NO_CACHE_DIR=off RUN apk --no-cache add \ yarn \ - poetry \ git \ musl-dev \ gcc \ @@ -20,16 +19,28 @@ RUN apk --no-cache add \ jpeg-dev \ grep \ sed \ - libffi-dev + libffi-dev \ + poetry -ENV VERSION=v2.4.2 +ENV FLORET_VERSION=v0.10.5 + +RUN git clone https://github.com/explosion/floret.git /floret +RUN cd /floret && git checkout $FLORET_VERSION +RUN sed -i '/^#include /a #include ' /floret/src/args.h + +ENV VERSION=v2.8.0 RUN git clone https://github.com/mealie-recipes/mealie.git WORKDIR /mealie RUN git checkout $VERSION -RUN poetry install -E pgsql --only main -RUN find .venv/bin -type f -exec grep -lZ "^#!/mealie/.venv/bin/python" {} + | xargs -0 -I {} sed -i "1s|^#!/mealie/.venv/bin/python|#!/py-pkgs/bin/python|" {} -RUN echo "/home/mealie/app/" > /mealie/.venv/lib/python3.12/site-packages/mealie.pth + +RUN poetry export --only=main --without-hashes --extras=pgsql --output=requirements.txt +RUN sed -i 's|floret==0.10.5 ; python_version >= "3.12" and python_version < "3.13"|floret @ file:///floret ; python_version >= "3.12" and python_version < "3.13"|' requirements.txt +RUN python3 -m venv env +RUN env/bin/pip3 install -r requirements.txt + +RUN find env/bin -type f -exec grep -lZ "^#!/mealie/env/bin/python" {} + | xargs -0 -I {} sed -i "1s|^#!/mealie/env/bin/python|#!/py-pkgs/bin/python|" {} +RUN echo "/home/mealie/app/" > /mealie/env/lib/python3.12/site-packages/mealie.pth WORKDIR /mealie/frontend RUN yarn install \ @@ -41,24 +52,6 @@ RUN yarn install \ --ignore-engines RUN echo "n" | yarn generate -FROM docker.io/alpine:3.20 as crfpp - -ENV VERSION=c56dd9f29469c8a9f34456b8c0d6ae0476110516 - -RUN apk --no-cache add \ - g++ \ - make \ - git - -RUN git clone https://github.com/mealie-recipes/crfpp.git -WORKDIR /crfpp -RUN git checkout $VERSION - -COPY config.guess . -COPY config.sub . -RUN ./configure --prefix=/ -RUN make -RUN make DESTDIR=/dist install FROM docker.io/alpine:3.21 @@ -77,21 +70,21 @@ RUN apk add --no-cache \ zlib \ jpeg -COPY --from=crfpp /dist/bin /bin/ -COPY --from=crfpp /dist/lib /lib/ -COPY --from=builder --chown=mealie:mealie /mealie/.venv /py-pkgs +COPY --from=builder --chown=mealie:mealie /mealie/env /py-pkgs COPY --from=builder --chown=mealie:mealie /mealie/mealie /home/mealie/app/mealie COPY --from=builder --chown=mealie:mealie /mealie/frontend/dist /home/mealie/app/static RUN mkdir -p /app/data RUN chown mealie:mealie /app/data +ENV NLTK_DATA="/nltk_data/" +RUN mkdir -p $NLTK_DATA +RUN /py-pkgs/bin/python -m nltk.downloader -d $NLTK_DATA averaged_perceptron_tagger_eng + ENV HOME /home/mealie/app WORKDIR /home/mealie/app USER mealie -RUN /py-pkgs/bin/python /home/mealie/app/mealie/scripts/install_model.py - ENV APP_PORT=9000 ENV HOST=0.0.0.0