mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
production image rework
This commit is contained in:
parent
4b0e9c0d76
commit
0eb1e952b2
3 changed files with 7 additions and 11 deletions
15
Dockerfile
15
Dockerfile
|
@ -5,25 +5,22 @@ RUN npm install
|
|||
COPY ./frontend/ .
|
||||
RUN npm run build
|
||||
|
||||
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
|
||||
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-slim
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y python-pip python-dev
|
||||
|
||||
# We copy just the requirements.txt first to leverage Docker cache
|
||||
COPY ./requirements.txt /app/requirements.txt
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install -r requirements.txt
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y python-pip python-dev git --no-install-recommends && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
pip install -r requirements.txt
|
||||
|
||||
COPY ./mealie /app
|
||||
COPY ./mealie/data/templates/recipes.md /app/data/templates/recipes.md
|
||||
COPY --from=build-stage /app/dist /app/dist
|
||||
RUN rm -rf /app/test /app/temp
|
||||
|
||||
ENV ENV prod
|
||||
ENV APP_MODULE "app:app"
|
||||
|
||||
VOLUME [ "/app/data" ]
|
||||
|
||||
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "9000"]
|
|
@ -9,7 +9,7 @@ services:
|
|||
container_name: mealie
|
||||
restart: always
|
||||
ports:
|
||||
- 9090:9000
|
||||
- 9090:80
|
||||
environment:
|
||||
db_username: root
|
||||
db_password: example
|
||||
|
|
|
@ -16,7 +16,6 @@ dnspython==2.0.0
|
|||
email-validator==1.1.1
|
||||
extruct==0.10.0
|
||||
fastapi==0.61.1
|
||||
fastapi-login==1.5.1
|
||||
future==0.18.2
|
||||
gitdb==4.0.5
|
||||
GitPython==3.1.11
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue