add Python server backend
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-05-11 14:06:39 +02:00
parent 14d63294a3
commit cd3afa4d61
22 changed files with 1896 additions and 119 deletions

View File

@@ -1,7 +1,18 @@
FROM node:18-slim
FROM node:20-slim AS frontend
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
CMD ["npm", "run", "server"]
# CMD ["npm", "run", "server"]
FROM python:3.12-slim
COPY --from=frontend /app/dist /app/dist
WORKDIR /app/server-python
RUN pip install poetry==1.8.2
COPY server-python/pyproject.toml server-python/poetry.lock ./
RUN poetry install
COPY server-python/app.py .
ENV PRODUCTION="true"
CMD ["poetry", "run", "fastapi", "run", "app.py", "--port", "3000"]