Next.js app deployed automatically to Dokku from the master branch.
- Node.js 22.x
- npm
npm ci
npm run devOpen http://localhost:3000.
npm run lint
npm run build- Push to
masterto trigger GitHub Actions deployment. - Workflow file:
.github/workflows/deploy.yml. - Deployment target: Dokku app
zslgdansk.
The app is configured with images.unoptimized: true in next.config.ts to avoid Next image optimizer cache growth.
Run these commands on the Dokku host when disk usage starts growing:
# Check Docker disk usage
docker system df
# Remove old containers/images/networks not in use
dokku cleanup
# Check app-specific storage mounts
dokku storage:report zslgdansk
# Inspect docker options (deploy and run phases)
dokku docker-options:report zslgdanskRecommended log rotation setup (run once on Dokku host):
dokku docker-options:add zslgdansk deploy "--log-opt max-size=10m"
dokku docker-options:add zslgdansk deploy "--log-opt max-file=5"
dokku docker-options:add zslgdansk run "--log-opt max-size=10m"
dokku docker-options:add zslgdansk run "--log-opt max-file=5"
dokku ps:rebuild zslgdanskIf a production issue appears after merge to master, rollback with:
git revert <commit-sha>
git push origin master