mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
new slim-buster image
This commit is contained in:
parent
349341b100
commit
92b63ca5a0
1 changed files with 37 additions and 33 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
# build
|
||||||
FROM node:lts-alpine as build-stage
|
FROM node:lts-alpine as build-stage
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY ./frontend/package*.json ./
|
COPY ./frontend/package*.json ./
|
||||||
|
@ -5,50 +6,53 @@ RUN npm install
|
||||||
COPY ./frontend/ .
|
COPY ./frontend/ .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM python:3.9-alpine
|
# run
|
||||||
|
FROM python:3.9-slim-buster
|
||||||
|
|
||||||
RUN apk add --no-cache libxml2-dev \
|
|
||||||
libxslt-dev \
|
|
||||||
libxml2 caddy \
|
|
||||||
libffi-dev \
|
|
||||||
python3 \
|
|
||||||
python3-dev \
|
|
||||||
jpeg-dev \
|
|
||||||
lcms2-dev \
|
|
||||||
openjpeg-dev \
|
|
||||||
zlib-dev
|
|
||||||
|
|
||||||
|
|
||||||
ENV PRODUCTION true
|
ENV PRODUCTION true
|
||||||
EXPOSE 80
|
ENV POETRY_VERSION 1.1.6
|
||||||
WORKDIR /app/
|
|
||||||
|
|
||||||
COPY ./pyproject.toml /app/
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
gcc g++ \
|
||||||
RUN apk add --update --no-cache --virtual .build-deps \
|
|
||||||
curl \
|
curl \
|
||||||
g++ \
|
gnupg gnupg2 gnupg1 \
|
||||||
python3-dev \
|
apt-transport-https \
|
||||||
musl-dev \
|
debian-archive-keyring \
|
||||||
gcc \
|
debian-keyring \
|
||||||
build-base && \
|
libwebp-dev \
|
||||||
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
|
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | apt-key add - \
|
||||||
cd /usr/local/bin && \
|
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee -a /etc/apt/sources.list.d/caddy-stable.list \
|
||||||
ln -s /opt/poetry/bin/poetry && \
|
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||||
poetry config virtualenvs.create false && \
|
caddy \
|
||||||
cd /app/ && poetry install --no-root --no-dev && \
|
&& apt autoremove \
|
||||||
apk --purge del .build-deps
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& apt-get remove -y curl apt-transport-https debian-keyring g++ gnupg gnupg2 gnupg1
|
||||||
|
|
||||||
|
|
||||||
|
RUN pip install --no-cache-dir "poetry==$POETRY_VERSION" \
|
||||||
|
&& poetry config virtualenvs.create false
|
||||||
|
|
||||||
|
#! Future
|
||||||
|
# pip install --no-cache-dir "psycopg2-binary==2.8.6"
|
||||||
|
|
||||||
|
# project dependencies
|
||||||
|
WORKDIR /app
|
||||||
|
COPY pyproject.toml /app/
|
||||||
COPY ./mealie /app/mealie
|
COPY ./mealie /app/mealie
|
||||||
RUN poetry install --no-dev
|
RUN poetry install --no-dev
|
||||||
|
|
||||||
|
#! Future
|
||||||
|
# COPY ./alembic /app
|
||||||
|
# COPY alembic.ini /app
|
||||||
|
|
||||||
COPY ./Caddyfile /app
|
COPY ./Caddyfile /app
|
||||||
COPY ./dev/data/templates /app/data/templates
|
COPY ./dev/data/templates /app/data/templates
|
||||||
|
|
||||||
|
# frontend build
|
||||||
COPY --from=build-stage /app/dist /app/dist
|
COPY --from=build-stage /app/dist /app/dist
|
||||||
|
|
||||||
VOLUME [ "/app/data/" ]
|
VOLUME [ "/app/data/" ]
|
||||||
|
|
||||||
RUN chmod +x /app/mealie/run.sh
|
EXPOSE 80
|
||||||
CMD /app/mealie/run.sh
|
|
||||||
|
|
||||||
|
CMD /app/mealie/run.sh
|
Loading…
Add table
Add a link
Reference in a new issue