Spaces:
Build error
Build error
Zerotracex-Stuff
commited on
Commit
·
12ab17b
1
Parent(s):
b601d38
First model version
Browse files- Dockerfile +5 -5
- README.md +4 -9
- package.json +2 -1
- server.js +0 -17
Dockerfile
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
# Use the official Node.js image as the base image
|
| 2 |
FROM node:20-slim
|
| 3 |
|
|
@@ -6,13 +7,12 @@ WORKDIR /app
|
|
| 6 |
|
| 7 |
# Copy package.json and package-lock.json to the working directory
|
| 8 |
COPY package*.json ./
|
| 9 |
-
# Copy the rest of the application code to the working directory
|
| 10 |
-
COPY . .
|
| 11 |
|
| 12 |
# Install dependencies
|
| 13 |
RUN npm install
|
| 14 |
|
| 15 |
-
|
|
|
|
| 16 |
|
| 17 |
# Build the Next.js application
|
| 18 |
RUN npm run build
|
|
@@ -20,5 +20,5 @@ RUN npm run build
|
|
| 20 |
# Expose the port your app runs on. Use 7860 as per the user's requirement.
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
-
# Command to run the
|
| 24 |
-
CMD ["
|
|
|
|
| 1 |
+
|
| 2 |
# Use the official Node.js image as the base image
|
| 3 |
FROM node:20-slim
|
| 4 |
|
|
|
|
| 7 |
|
| 8 |
# Copy package.json and package-lock.json to the working directory
|
| 9 |
COPY package*.json ./
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Install dependencies
|
| 12 |
RUN npm install
|
| 13 |
|
| 14 |
+
# Copy the rest of the application code to the working directory
|
| 15 |
+
COPY . .
|
| 16 |
|
| 17 |
# Build the Next.js application
|
| 18 |
RUN npm run build
|
|
|
|
| 20 |
# Expose the port your app runs on. Use 7860 as per the user's requirement.
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
+
# Command to run the application
|
| 24 |
+
CMD ["npm", "start", "--", "-p", "7860"]
|
README.md
CHANGED
|
@@ -1,10 +1,5 @@
|
|
| 1 |
-
|
| 2 |
-
title: Docs
|
| 3 |
-
emoji: 👁
|
| 4 |
-
colorFrom: purple
|
| 5 |
-
colorTo: purple
|
| 6 |
-
sdk: docker
|
| 7 |
-
pinned: false
|
| 8 |
-
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Firebase Studio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
This is a NextJS starter in Firebase Studio.
|
| 4 |
+
|
| 5 |
+
To get started, take a look at src/app/page.tsx.
|
package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
{
|
| 2 |
"name": "nextn",
|
| 3 |
"version": "0.1.0",
|
|
@@ -7,7 +8,7 @@
|
|
| 7 |
"genkit:dev": "genkit start -- tsx src/ai/dev.ts",
|
| 8 |
"genkit:watch": "genkit start -- tsx --watch src/ai/dev.ts",
|
| 9 |
"build": "next build",
|
| 10 |
-
"start": "
|
| 11 |
"lint": "next lint",
|
| 12 |
"typecheck": "tsc --noEmit",
|
| 13 |
"postinstall": "cp node_modules/pdfjs-dist/build/pdf.worker.min.js public/"
|
|
|
|
| 1 |
+
|
| 2 |
{
|
| 3 |
"name": "nextn",
|
| 4 |
"version": "0.1.0",
|
|
|
|
| 8 |
"genkit:dev": "genkit start -- tsx src/ai/dev.ts",
|
| 9 |
"genkit:watch": "genkit start -- tsx --watch src/ai/dev.ts",
|
| 10 |
"build": "next build",
|
| 11 |
+
"start": "next start",
|
| 12 |
"lint": "next lint",
|
| 13 |
"typecheck": "tsc --noEmit",
|
| 14 |
"postinstall": "cp node_modules/pdfjs-dist/build/pdf.worker.min.js public/"
|
server.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
| 1 |
-
const { createServer } = require('http');
|
| 2 |
-
const { parse } = require('url');
|
| 3 |
-
const next = require('next');
|
| 4 |
-
|
| 5 |
-
const port = parseInt(process.env.PORT, 10) || 7860;
|
| 6 |
-
const dev = process.env.NODE_ENV !== 'production';
|
| 7 |
-
const app = next({ dev });
|
| 8 |
-
const handle = app.getRequestHandler();
|
| 9 |
-
|
| 10 |
-
app.prepare().then(() => {
|
| 11 |
-
createServer((req, res) => {
|
| 12 |
-
const parsedUrl = parse(req.url, true);
|
| 13 |
-
handle(req, res, parsedUrl);
|
| 14 |
-
}).listen(port, () => {
|
| 15 |
-
console.log(`🚀 App running on http://localhost:${port}`);
|
| 16 |
-
});
|
| 17 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|