mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-01-18 06:51:19 -05:00
This reverts commit 19aa572bd8.
This commit is contained in:
28
Dockerfile
28
Dockerfile
@@ -11,7 +11,7 @@ RUN npm run build
|
||||
###############################################
|
||||
# Base Image
|
||||
###############################################
|
||||
FROM python:3.9.6-slim as python-base
|
||||
FROM python:3.9-slim as python-base
|
||||
|
||||
ENV MEALIE_HOME="/app"
|
||||
|
||||
@@ -29,12 +29,9 @@ ENV PYTHONUNBUFFERED=1 \
|
||||
# prepend poetry and venv to path
|
||||
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
|
||||
|
||||
ENV PUID=911 \
|
||||
PGID=911
|
||||
|
||||
# create user account with default group
|
||||
RUN groupadd -g $PGID mealie \
|
||||
&& useradd -l -u $PUID -g $PGID -d $MEALIE_HOME -s /bin/bash mealie \
|
||||
# create user account
|
||||
RUN useradd -u 911 -U -d $MEALIE_HOME -s /bin/bash abc \
|
||||
&& usermod -G users abc \
|
||||
&& mkdir $MEALIE_HOME
|
||||
|
||||
###############################################
|
||||
@@ -59,7 +56,7 @@ RUN apt-get update \
|
||||
&& pip install -U --no-cache-dir pip
|
||||
|
||||
# install poetry - respects $POETRY_VERSION & $POETRY_HOME
|
||||
ENV POETRY_VERSION=1.1.7
|
||||
ENV POETRY_VERSION=1.1.6
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
|
||||
|
||||
# copy project requirement files here to ensure they will be cached.
|
||||
@@ -99,7 +96,6 @@ ENTRYPOINT $MEALIE_HOME/mealie/run.sh "reload"
|
||||
###############################################
|
||||
FROM python-base as production
|
||||
ENV PRODUCTION=true
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# curl for used by healthcheck
|
||||
RUN apt-get update \
|
||||
@@ -133,20 +129,12 @@ COPY --from=frontend-build /app/dist $MEALIE_HOME/dist
|
||||
COPY ./dev/data/templates $MEALIE_HOME/data/templates
|
||||
COPY ./Caddyfile $MEALIE_HOME
|
||||
|
||||
RUN mkdir $MEALIE_HOME/temp \
|
||||
&& id -u mealie | xargs -I{} chown -R {}:{} $MEALIE_HOME
|
||||
USER $PUID:$PGID
|
||||
VOLUME [ "$MEALIE_HOME/data/" ]
|
||||
ENV APP_PORT=80
|
||||
|
||||
RUN chmod 755 "$MEALIE_HOME/data/" \
|
||||
&& chmod g+s "$MEALIE_HOME/data/"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV APP_PORT=9080
|
||||
EXPOSE ${APP_PORT}
|
||||
|
||||
HEALTHCHECK CMD curl -fs http://localhost:${APP_PORT} || exit 1
|
||||
|
||||
RUN chmod +x mealie/run.sh
|
||||
ENTRYPOINT mealie/run.sh
|
||||
RUN chmod +x $MEALIE_HOME/mealie/run.sh
|
||||
ENTRYPOINT $MEALIE_HOME/mealie/run.sh
|
||||
|
||||
Reference in New Issue
Block a user