This is a Next.js 14.2.4 project with Custom Server and Docker support, bootstrapped with create-next-app.
First, install dependencies:
pnpm installThen run the development server with the custom server:
pnpm devOpen http://localhost:3001 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Inter, a custom Google Font.
Build and run with Docker Compose:
docker-compose up --buildOr use Docker directly:
# Build the image
docker build -t tomovault-next .
# Run the container
docker run -p 3001:3001 tomovault-nextAccess the application at http://localhost:3001
This project uses a custom Node.js server (server.ts) following the official Next.js documentation. The custom server allows for:
- Custom routing patterns
- Middleware integration
- WebSocket support
- Custom request handling
⚠️ Important Note: Custom servers are not compatible with Next.jsoutput: 'standalone'mode. This project uses the standard build output with allnode_modulesincluded in the Docker image.
.
├── app/ # Next.js App Router
├── public/ # Static assets
├── server.ts # Custom Server (TypeScript)
├── next.config.mjs # Next.js configuration
├── package.json # Dependencies and scripts
├── Dockerfile # Multi-stage Docker build
└── docker-compose.yml # Docker orchestration
- Next.js: 14.2.4
- React: 18
- TypeScript: 5
- Tailwind CSS: 3.4.1
- Node.js: 18 (Alpine)
- Docker: Multi-stage build
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.