Add static file serving and basic docker config

This commit is contained in:
2023-01-18 00:18:35 +01:00
parent 3fcb1fb8f5
commit c10eca266a
4 changed files with 30 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
FROM node:19.4-alpine AS frontend
ARG server_url
RUN test -n "${server_url}"
COPY glebby-client /glebby-client
WORKDIR /glebby-client
RUN npm install
ENV VITE_GLEBBY_SERVER_URL=${server_url}
RUN npx vite build --outDir static
FROM python:3.11-alpine
COPY glebby-server /glebby-server
WORKDIR /glebby-server
RUN pip install -r requirements.txt
RUN pip install gunicorn
COPY --from=frontend /glebby-client/static /glebby-server/static
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--threads", "100", "glebby:app"]