controlpanel/Dockerfile
2022-09-25 23:57:27 +02:00

30 lines
546 B
Docker

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"]