feat(docker): Dockerized

This commit is contained in:
TheOnlyWayUp
2023-12-29 03:07:07 +00:00
parent a5727735d7
commit 944afc92bf
2 changed files with 26 additions and 0 deletions
+1
View File
@@ -4,3 +4,4 @@ venv
*html
data
*ipynb
build
+25
View File
@@ -0,0 +1,25 @@
FROM node:20
WORKDIR /build
COPY src/frontend/package*.json .
RUN rm -rf node_modules
RUN rm -rf build
RUN npm install
COPY src/frontend/. .
RUN npm run build
# Thanks https://stackoverflow.com/q/76988450
FROM python:3.10-slim
WORKDIR /app
COPY src/api/requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY --from=0 /build/build /app/build
# COPY src/api/src/.env .env
COPY src/api/src .
EXPOSE 80
# ENV PORT=80
CMD [ "python3", "main.py"]