Spaces:
Runtime error
Runtime error
Download Dockerfile from luminlab-adapt/web-app-temp: direct link, hf CLI and curl.
- Browser
- Download file 957 Bytes
-
https://huggingface.co/spaces/luminlab-adapt/web-app-temp/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/luminlab-adapt/web-app-temp/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/luminlab-adapt/web-app-temp/resolve/main/Dockerfile
957 Bytes
| #------------------------ | |
| # STAGE 1: Backend build | |
| #------------------------ | |
| FROM python:3.9-slim-buster as backend | |
| WORKDIR /app/backend | |
| # Copy necessary files | |
| COPY requirements.txt . | |
| COPY build_scripts/build.sh . | |
| # Set environment variable, make the script executable and run it | |
| ENV STAGE=backend | |
| RUN chmod +x ./build.sh && \ | |
| ./build.sh backend && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Copy the rest of the backend app | |
| COPY web_app/backend/ . | |
| CMD ["python", "run.py"] | |
| #------------------------- | |
| # STAGE 2: Frontend build | |
| #------------------------- | |
| FROM node:14-alpine as frontend | |
| WORKDIR /app/frontend | |
| # Grouped copy for package-related files and the frontend app | |
| COPY web_app/frontend/package*.json . | |
| COPY web_app/frontend/ . | |
| COPY build_scripts/build.sh . | |
| # Set environment variables, make the script executable and run it | |
| ENV STAGE=frontend | |
| RUN chmod +x ./build.sh && ./build.sh frontend | |
| EXPOSE 3000 | |
| CMD ["serve", "-s", "dist", "-l", "3000"] | |