diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d24b469 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM archlinux:base-devel AS builder + +RUN pacman -Syu npm luarocks just --noconfirm + +# build frontend +WORKDIR /frontend +COPY frontend . +RUN npm install && npm run build + +# build lua +WORKDIR /lua +COPY lua . +RUN luarocks install tl && \ + eval $(luarocks path) && \ + just build + +# build final container +FROM python:3 +WORKDIR /usr/src/app +COPY server . +COPY --from=builder /frontend/dist frontend +COPY --from=builder /lua/out lua + +RUN pip install -e "." + +ENV UVICORN_HOST="0.0.0.0" +ENV UVICORN_PORT="80" +EXPOSE 80 + +CMD ["uvicorn", "server:app"] \ No newline at end of file