HUB
Sign inSign up
nextjs-cluster logo

11notes/nextjs-cluster

By 11notes

•Updated over 2 years ago

Run Nextjs Cluster based on Alpine Linux. Small, lightweight, secure and fast 🏔️

Image
0

1.9K

11notes/nextjs-cluster repository overview

⁠Alpine :: Nextjs Cluster

size version pulls activity commit-last

Run Nextjs Cluster based on Alpine Linux. Small, lightweight, secure and fast 🏔️

⁠Description

Use this image as a base layer to deploy or develop your nodejs application with express. Simply add your code and your package.json to -v .../app:/next. You can use the existing express.js class if you want, like this:

⁠Volumes

  • /next/js - Directory of your nodejs express application (main.js or package.json)

⁠Run

docker run --name nextjs-cluster \
  -v ../js:/next/js \
  -d 11notesnextjs-cluster:[tag]

Overcommit (run more forks than CPUs available)

docker run --name nextjs-cluster \
  -v ../js:/next/js \
  -e PORTS=8080-8100 \
  -e OVERCOMMIT=true \
  -d 11notesnextjs-cluster:[tag]

⁠Defaults

ParameterValueDescription
userdockeruser docker
uid1000user id 1000
gid1000group id 1000
home/nexthome directory of user docker

⁠Environment

ParameterValueDefault
TZTime Zone⁠
DEBUGShow debug information
JSpath to javascript file for fork()/next/js/server.js
PORTSport range8080-8080+n(cpus)
IPlocalhost or 127.0.0.1 or a dedicated IP0.0.0.0
OVERCOMMITFork more nodejs than CPU availabilefalse

⁠Parent image

⁠Built with (thanks to)

${{ CONTENT:11NOTES:IMAGE:NODE }}

⁠Tips

  • Only use rootless container runtime (podman, rootless docker)
  • Don't bind to ports < 1024 (requires root), use NAT/reverse proxy (haproxy, traefik, nginx)

Tag summary

Content type

Image

Digest

sha256:f70f22483…

Size

133.6 MB

Last updated

over 2 years ago

docker pull 11notes/nextjs-cluster