Skip to the article
Aniq-UI

Financial DashboardSettings

Settings

Every setting the dashboard reads, its default, the port, and how to change them with Docker and without.

The settings

Every setting is optional: the dashboard runs without any of them.

VariableDefaultWhat it does
NEXT_PUBLIC_DEMO_MODEfalsetrue shows the demo sign-in details on the sign-in page, fills them in, and shows a floating colour switcher. Leave it off for your own product.
BUILD_STANDALONEemptytrue builds a self-contained server into .next/standalone. The Dockerfile sets it for you. Leave it empty for yarn start.

The port

The dashboard answers on port 3030. It is not a variable: the dev and start scripts in package.json pass -p 3030, and the Docker image sets PORT=3030. To use another port for one run:

How you run itOn port 3041
Dockerdocker run -p 3041:3030 financial-dashboard, changing only the number on the left of -p
Development serveryarn dev -p 3041
Production buildyarn start -p 3041

Without Docker

Copy .env.example to .env.local and edit the values there. Keep .env.example as it is, as the list of what exists.

Terminalin dashboard-template-1
cp .env.example .env.local
.env.local
NEXT_PUBLIC_DEMO_MODE=true

With Docker

The image build does not read .env or .env.local files. Pass each value as a build argument instead:

Terminalin dashboard-template-1
docker build -t financial-dashboard --build-arg NEXT_PUBLIC_DEMO_MODE=true .

When a change takes effect

Values that start with NEXT_PUBLIC_ are compiled into the JavaScript the browser loads when the app is built. Changing one changes nothing until the app is built again:

How you run itAfter changing a value
yarn devStop the server and run yarn dev again.
yarn build and yarn startRun yarn build again, then yarn start.
DockerBuild the image again with the value as a --build-arg, then start a new container.
VercelChange it in the project's Environment Variables and deploy again.

Never put a secret in a NEXT_PUBLIC_ value: every visitor can read it in the page's code. Keys for your own services belong on your server.

The standalone build

With BUILD_STANDALONE=true, yarn build writes a server that needs no node_modules into .next/standalone. The Dockerfile uses it to keep the image small. yarn start is not meant for that kind of build and warns "next start" does not work with "output: standalone" configuration. Leave the variable empty unless you copy the standalone folder to a server yourself.

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.