Add Dockerfile
This commit is contained in:
parent
fb44bc2178
commit
466449b7b8
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@ -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"]
|
Loading…
Reference in New Issue
Block a user