Skip to the article
Aniq-UI

3D LandingPut the site online

Put the site online

Deploy to Vercel, to any server with Node.js, or as a Docker image.

The site is a plain Next.js app with no database, no API and no secrets. Check that it builds on your computer first:

Terminalin juicy
yarn build

Then pick one of the three ways below.

Environment variables

None are needed, at build time or at run time. The only variable the code reads is an optional build switch:

VariableWhenWhat it does
BUILD_STANDALONEBuildtrue makes yarn build write a standalone server to .next/standalone. The Dockerfile sets it; leave it unset everywhere else.

Vercel

  1. Put the folder in a Git repository

    Push the juicy folder to GitHub, GitLab or Bitbucket. .gitignore already leaves out node_modules and the build output.

  2. Import it in Vercel

    In Vercel, add a new project from that repository. It detects Next.js; keep the default build settings.

  3. Let Vercel use Yarn 4

    Before the first deploy, add one environment variable to the project, so Vercel installs with the Yarn version pinned in package.json:

    Vercel environment variable
    ENABLE_EXPERIMENTAL_COREPACK=1
  4. Deploy

    Start the deploy. Every push to the repository deploys again.

    Expected result: The site answers on its Vercel address, then on your domain once you add it in the project's settings.

Any server with Node.js

On a server with Node.js 22 or newer, copy the juicy folder, then install, build and start it:

Terminalin juicy
corepack enable
yarn install
yarn build
yarn start

It listens on port 3030. Point your domain at it through a reverse proxy such as Nginx or Caddy, and keep it running with a process manager such as pm2 or a systemd service.

yarn start ignores a PORT variable. On a host that assigns the port itself, tell it the app listens on 3030, or start it with yarn next start -p $PORT.

The site does not answer on a hosting service

Docker

The same image you run locally runs on a server. It serves a standalone build on port 3030 and needs no variables. On the server, from the juicy folder:

Terminalin juicy
docker build -t juicy .
docker run -d --restart unless-stopped --name juicy -p 3030:3030 juicy

--restart unless-stopped starts it again after a reboot. Point your domain at port 3030 through a reverse proxy. Any host that runs a container from a Dockerfile can build it the same way.

To update the site, build the image again, then replace the container:

Terminalin juicy
docker build -t juicy .
docker rm -f juicy
docker run -d --restart unless-stopped --name juicy -p 3030:3030 juicy

Next

Stuck on a step?

Find a fix before you start over.

Troubleshooting

Cookie Preferences

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies for analytics and personalized advertising.