Port
This commit is contained in:
+2
-2
@@ -31,9 +31,9 @@ COPY --from=builder /app/.next/static ./.next/static
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 8588
|
||||
|
||||
ENV PORT 3000
|
||||
ENV PORT 8588
|
||||
ENV HOSTNAME "0.0.0.0"
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
@@ -28,14 +28,15 @@ npm install
|
||||
# Run development server
|
||||
npm run dev
|
||||
|
||||
# Build for production
|
||||
npm run build
|
||||
# Build and run production server (port 8588)
|
||||
npm run prod
|
||||
|
||||
# Start production server
|
||||
# Or build once, then start
|
||||
npm run build
|
||||
npm start
|
||||
```
|
||||
|
||||
The website will be available at [http://localhost:3000](http://localhost:3000).
|
||||
The production server listens on [http://localhost:8588](http://localhost:8588). Development (`npm run dev`) uses port 3000 by default.
|
||||
|
||||
## Project Structure
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "8588:8588"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
restart: unless-stopped
|
||||
|
||||
+2
-1
@@ -5,7 +5,8 @@
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"start": "next start -p 8588",
|
||||
"prod": "npm run build && next start -p 8588",
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user