Spaces:
Sleeping
Sleeping
Download Dockerfile from moustafa7/protofolio: direct link, hf CLI and curl.
- Browser
- Download file 596 Bytes
-
https://huggingface.co/spaces/moustafa7/protofolio/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/moustafa7/protofolio/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/moustafa7/protofolio/resolve/main/Dockerfile
596 Bytes
| FROM node:20-alpine AS frontend-build | |
| WORKDIR /app/frontend | |
| COPY frontend/package*.json ./ | |
| RUN npm install | |
| COPY frontend/ ./ | |
| RUN npm run build | |
| FROM node:20-bullseye | |
| RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY backend/package*.json ./ | |
| RUN npm install | |
| COPY backend/ ./ | |
| RUN npx prisma generate | |
| RUN npm run build | |
| COPY --from=frontend-build /app/frontend/dist ./public | |
| RUN mkdir -p /data/uploads | |
| EXPOSE 7860 | |
| ENV UPLOAD_DIR=/data/uploads | |
| CMD ["sh", "-c", "npx prisma db push --accept-data-loss && npx prisma db seed && node dist/app.js"] | |