DEV Community

Fabian
Fabian

Posted on

Development & Production Environments

Goal:

The goal is to setup the above basic architecture.

What remains is roughly(chatgpt):

Containerise Next.js locally
Run that container on Hetzner
Confirm it works internally on the server.
Point Nginx at the container
Replace the temporary static page with the real app.
Introduce Docker Compose
Manage the app more cleanly and prepare separate dev and production services.
Add dev.mynextjsapp.com
Separate environment variables, port, and password protection.
Add production public/private mode
Nginx authentication during maintenance.
Create a repeatable deployment process
Initially manual: build image, move/push it, pull it on Hetzner, restart the intended service, verify, roll back if needed.
Optional automation later
GitHub Container Registry and GitHub Actions. These are not required to launch.

Top comments (0)