Download Dockerfile.frontend from HarryDataScience/sentinel-fraud-detection: direct link, hf CLI and curl.
- Browser
- Download file 357 Bytes
-
https://huggingface.co/spaces/HarryDataScience/sentinel-fraud-detection/resolve/main/Dockerfile.frontend
- Command line
-
hf download hf://spaces/HarryDataScience/sentinel-fraud-detection/Dockerfile.frontend
-
curl -L -o Dockerfile.frontend https://huggingface.co/spaces/HarryDataScience/sentinel-fraud-detection/resolve/main/Dockerfile.frontend
357 Bytes
| # Build stage | |
| FROM node:18-alpine AS build | |
| WORKDIR /app | |
| COPY frontend/package.json . | |
| RUN npm install | |
| COPY frontend/ . | |
| ARG REACT_APP_API_URL=http://localhost:8000 | |
| ENV REACT_APP_API_URL=$REACT_APP_API_URL | |
| RUN npm run build | |
| # Serve with nginx | |
| FROM nginx:alpine | |
| COPY --from=build /app/build /usr/share/nginx/html | |
| EXPOSE 3000 | |
| CMD ["nginx", "-g", "daemon off;"] | |