push to 2.0.0

This commit is contained in:
Sebastian Hugentobler 2024-10-23 10:26:33 +02:00
parent c6a21bbfd0
commit 50c31b93a6
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0

View File

@ -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_VIRTUALENVS_IN_PROJECT=true
ENV POETRY_NO_INTERACTION=1 ENV POETRY_NO_INTERACTION=1
@ -22,14 +22,14 @@ RUN apk --no-cache add \
sed \ sed \
libffi-dev libffi-dev
ENV VERSION=13edefbf4168ee56f12a1ab5d9d1358094772b09 ENV VERSION=v2.0.0
RUN git clone https://github.com/mealie-recipes/mealie.git RUN git clone https://github.com/mealie-recipes/mealie.git
WORKDIR /mealie WORKDIR /mealie
RUN git checkout $VERSION RUN git checkout $VERSION
RUN poetry install -E pgsql --only main 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 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 WORKDIR /mealie/frontend
RUN yarn install \ RUN yarn install \
@ -41,7 +41,7 @@ RUN yarn install \
--ignore-engines --ignore-engines
RUN echo "n" | yarn generate RUN echo "n" | yarn generate
FROM docker.io/alpine:3.19 as crfpp FROM docker.io/alpine:3.20 as crfpp
ENV VERSION=c56dd9f29469c8a9f34456b8c0d6ae0476110516 ENV VERSION=c56dd9f29469c8a9f34456b8c0d6ae0476110516
@ -60,7 +60,7 @@ RUN ./configure --prefix=/
RUN make RUN make
RUN make DESTDIR=/dist install RUN make DESTDIR=/dist install
FROM docker.io/alpine:3.19 FROM docker.io/alpine:3.20
ENV PRODUCTION=true ENV PRODUCTION=true
ENV TESTING=false ENV TESTING=false
@ -75,14 +75,12 @@ RUN apk add --no-cache \
python3 \ python3 \
libldap \ libldap \
zlib \ zlib \
jpeg \ jpeg
py3-gunicorn
COPY --from=crfpp /dist/bin /bin/ COPY --from=crfpp /dist/bin /bin/
COPY --from=crfpp /dist/lib /lib/ COPY --from=crfpp /dist/lib /lib/
COPY --from=builder --chown=mealie:mealie /mealie/.venv /py-pkgs 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/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.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/alembic /home/mealie/app/alembic
COPY --from=builder --chown=mealie:mealie /mealie/frontend/dist /home/mealie/app/static 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 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 EXPOSE 9000
VOLUME ["/app/data"] VOLUME ["/app/data"]
CMD ["uvicorn", "mealie.app:app", "--host", "0.0.0.0", "--port", "9000"] CMD ["python3", "mealie/main.py"]