Spaces:
Running
Running
File size: 871 Bytes
d646dd7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # ββ Stage 1: Build React frontend ββ
FROM node:22-alpine AS frontend
WORKDIR /src
COPY web/workflow-studio/package.json web/workflow-studio/package-lock.json* ./
RUN npm ci
COPY web/workflow-studio/ ./
RUN npm run build
# ββ Stage 2: Python runtime ββ
FROM python:3.12-slim
WORKDIR /srv/app
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app ./app
COPY web/templates ./web/templates
COPY web/static ./web/static
COPY --from=frontend /static/workflow-studio ./web/static/workflow-studio
EXPOSE 2586
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:2586/health', timeout=4)" || exit 1
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "2586"]
|