Spaces:
Runtime error
Runtime error
Download Dockerfile from AnthoneoJ/nextjs-replicate: direct link, hf CLI and curl.
- Browser
- Download file 544 Bytes
-
https://huggingface.co/spaces/AnthoneoJ/nextjs-replicate/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/AnthoneoJ/nextjs-replicate/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/AnthoneoJ/nextjs-replicate/resolve/main/Dockerfile
544 Bytes
| # ==== CONFIGURE ===== | |
| # Use a Node 20 base image | |
| FROM node:20 | |
| # Set the working directory to /code inside the container | |
| WORKDIR /code | |
| # Copy app files | |
| COPY . . | |
| # ==== BUILD ===== | |
| # Install dependencies (npm ci makes sure the exact versions in the lockfile gets installed) | |
| RUN npm install | |
| # Build the app | |
| RUN npm run build | |
| # ==== RUN ======= | |
| # Set the env to "production" | |
| ENV NODE_ENV production | |
| # Expose the port on which the app will be running (3000 is the default that `serve` uses) | |
| EXPOSE 7860 | |
| # Start the app | |
| CMD [ "npm", "run", "start" ] |