Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +0 -23
- src/components/chat.tsx +1 -1
Dockerfile
CHANGED
|
@@ -1,33 +1,10 @@
|
|
| 1 |
-
# for deploying a Next.js application in a Docker container
|
| 2 |
-
|
| 3 |
-
# Use Node 22 as the base image
|
| 4 |
FROM node:22-alpine
|
| 5 |
-
|
| 6 |
-
# Set the working directory inside the container
|
| 7 |
WORKDIR /app
|
| 8 |
-
|
| 9 |
-
# Copy package.json and package-lock.json
|
| 10 |
COPY package*.json ./
|
| 11 |
-
|
| 12 |
-
# Install dependencies
|
| 13 |
RUN npm install
|
| 14 |
-
|
| 15 |
-
# Copy the rest of the application code
|
| 16 |
COPY . .
|
| 17 |
-
|
| 18 |
-
# Expose the port your app runs on
|
| 19 |
EXPOSE 7860
|
| 20 |
-
|
| 21 |
-
# --- FIX IS HERE ---
|
| 22 |
-
# Build the application. This runs during the `docker build` command.
|
| 23 |
RUN npm run build
|
| 24 |
-
|
| 25 |
-
# Change ownership of /app to the node user
|
| 26 |
-
# Do this *after* all root operations (like npm install/build) are done
|
| 27 |
RUN chown -R node:node /app
|
| 28 |
-
|
| 29 |
-
# Switch to a non-root user for better security
|
| 30 |
USER node
|
| 31 |
-
|
| 32 |
-
# Command to run the application when the container starts
|
| 33 |
CMD ["npm", "run", "start"]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM node:22-alpine
|
|
|
|
|
|
|
| 2 |
WORKDIR /app
|
|
|
|
|
|
|
| 3 |
COPY package*.json ./
|
|
|
|
|
|
|
| 4 |
RUN npm install
|
|
|
|
|
|
|
| 5 |
COPY . .
|
|
|
|
|
|
|
| 6 |
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
| 7 |
RUN npm run build
|
|
|
|
|
|
|
|
|
|
| 8 |
RUN chown -R node:node /app
|
|
|
|
|
|
|
| 9 |
USER node
|
|
|
|
|
|
|
| 10 |
CMD ["npm", "run", "start"]
|
src/components/chat.tsx
CHANGED
|
@@ -139,7 +139,7 @@ export function Chat() {
|
|
| 139 |
isFileSelected={!!file}
|
| 140 |
/>
|
| 141 |
<p className="text-xs text-center text-muted-foreground pt-2">
|
| 142 |
-
created with ❤️ sameer banchhor
|
| 143 |
</p>
|
| 144 |
</div>
|
| 145 |
</div>
|
|
|
|
| 139 |
isFileSelected={!!file}
|
| 140 |
/>
|
| 141 |
<p className="text-xs text-center text-muted-foreground pt-2">
|
| 142 |
+
created with ❤️ by sameer banchhor
|
| 143 |
</p>
|
| 144 |
</div>
|
| 145 |
</div>
|