This project demonstrates a streamlined Next.js application configured for static export and strictly deployed using Docker with an Nginx server.
- Next.js Static Export: Fully static build generated in the
/outdirectory. No Node.js server required at runtime. - Nginx Serving: Robust, lightweight production-grade web serving over port 8080.
- pnpm Driven: Dependencies and builds are strictly locked to
pnpmfor faster, reproducible performance. - Modern UI: Tailored with a custom glassmorphism entry page using Tailwind CSS v4.
- Docker installed on your machine.
- Optional:
pnpminstalled locally if you want to run the project outside of Docker.
- Build and Start the Container
The application environment is orchestrated entirely through Docker Compose. Run the following command to build the image and start the Server instance:
docker compose up -d --build- View the Application
Once the container reports as Up, open your browser and navigate to:
- next.config.ts: Configured with
output: "export"andimages: { unoptimized: true }to satisfy static export requirements. - Dockerfile: Uses a multi-stage approach taking a
node:slimfoundation to build your app usingpnpmand annginxinc/nginx-unprivilegedrootless runner to host the output static files. - compose.yml: Exposes the containerized Nginx instance on
8080port mapping.
To stop the running application, execute:
docker compose down