munch-ease-deploy/Dockerfile

24 lines
550 B
Text
Raw Normal View History

2025-12-13 04:36:29 +00:00
FROM python:3.12
2024-09-21 01:02:10 +00:00
ARG FRONTEND_DIR=munch-ease-frontend
ARG BACKEND_DIR=munch-ease-backend
WORKDIR /code
2024-09-21 01:10:29 +00:00
COPY "${BACKEND_DIR}/requirements.txt" /code/requirements.txt
2024-09-21 01:02:10 +00:00
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
2024-09-21 01:10:29 +00:00
RUN pip install --no-cache-dir fastapi uvicorn
COPY "${BACKEND_DIR}" /code/app
COPY "${FRONTEND_DIR}/dist" /code/app/front-dist
2024-09-21 01:02:10 +00:00
# Set production flag
ENV DOOF_PROD=1
2024-09-21 01:27:12 +00:00
ENV DOOF_DB=/data/doof.sqlite
2024-09-21 03:00:42 +00:00
ENV DOOF_PORT=4006
2024-09-21 01:02:10 +00:00
EXPOSE 80
WORKDIR /code/app
2024-09-21 01:47:24 +00:00
CMD python -m uvicorn main:app --host 0.0.0.0 --port "${DOOF_PORT}"