Files
mealie/Dockerfile

33 lines
874 B
Docker
Raw Normal View History

2021-01-08 22:57:59 -09:00
FROM node:lts-alpine as build-stage
2020-12-24 16:37:38 -09:00
WORKDIR /app
COPY ./frontend/package*.json ./
RUN npm install
COPY ./frontend/ .
RUN npm run build
2021-01-09 22:57:19 -09:00
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-slim
2020-12-24 16:37:38 -09:00
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
2021-01-09 22:57:19 -09:00
RUN apt-get update -y && \
apt-get install -y python-pip python-dev git --no-install-recommends && \
rm -rf /var/lib/apt/lists/* && \
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false
COPY ./pyproject.toml ./app/poetry.lock* /app/
2020-12-24 16:37:38 -09:00
COPY ./mealie /app
RUN poetry install --no-root -no-dev
2020-12-24 16:37:38 -09:00
COPY --from=build-stage /app/dist /app/dist
RUN rm -rf /app/test /app/.temp
2020-12-24 16:37:38 -09:00
2021-01-05 14:14:55 +01:00
ENV ENV prod
2021-01-09 22:57:19 -09:00
ENV APP_MODULE "app:app"
2021-01-05 14:14:55 +01:00
2021-01-09 13:13:16 -09:00
VOLUME [ "/app/data" ]