Files
sensor-web-v2/Dockerfile
Marco Crapts cd3afa4d61
Some checks failed
continuous-integration/drone/push Build is failing
add Python server backend
2024-05-11 14:06:39 +02:00

19 lines
457 B
Docker

FROM node:20-slim AS frontend
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# 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"]