Initial Commit

This commit is contained in:
2023-09-08 19:05:37 +03:00
commit 7e60195cb7
185 changed files with 27107 additions and 0 deletions

31
api/Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
# syntax = docker/dockerfile:1
FROM python:3.11.5-slim as builder
RUN apt-get update && \
apt-get install -y libpq-dev gcc
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY requirements.txt .
RUN pip3 install -r requirements.txt
FROM python:3.11.5-slim
# Set working dir
COPY --from=builder /opt/venv /opt/venv
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PATH="/opt/venv/bin:$PATH"
COPY . /usr/src/virt.dashboard
WORKDIR /usr/src/virt.dashboard/app
EXPOSE 5000
CMD [ "waitress-serve", "--port=5000", "wsgi:app" ]