Skip to content

Build & Deploy

Build

There is no build. This is a plain Node.js project that runs node server.js directly.

package.json:

{
  "scripts": { "start": "node server.js" }
}

No bundler, no transpiler, no build step.

Deploy

This repo is not directly deployed to production. Production runs the in-process copy at someli-api/dashboard/, deployed via someli-api's pipeline.

There is: - No Dockerfile in this repo - No Jenkinsfile - No .github/workflows/ - No nginx.conf - No ecosystem.config.js

Per the README, the intended branching is feature → dev → uat → main, mirroring the other repos. But because nothing CI-watches this repo, those promotions don't trigger any deploy.

How to run it locally

cd someli-dashboard-be
yarn install      # or npm install
NODE_ENV=development yarn start
# Server boots on port 6001
# All endpoints return mock data

In any other NODE_ENV, the server will fail at the first request because routes/index.js will try to require("../../actions/actions") and ../../ doesn't contain someli-api.

How it could be deployed standalone (if the Path-B extraction happens)

Per relationship-to-someli-api.md, Path B is "promote the standalone." If pursued, a deploy story needs to be added:

  1. Containerise: a 12-line Dockerfile (FROM node:20-slim + WORKDIR + COPY + RUN yarn install --production + CMD ["node", "server.js"]).
  2. CI: copy Jenkinsfile or .github/workflows/dev-api-deploy.yml from someli-api and adapt.
  3. Reverse proxy: nginx config that proxies /dashboard/* on the public host to localhost:6001.
  4. PM2 entry in a new ecosystem.config.js, or systemd unit.
  5. DB credentials: replace the ../../routes/routes.js import with a local dbDriver and pass DB connection params via env.
  6. Auth glue: see authentication.md — a JWT validator needs to live in this repo (or in a shared package).

None of this exists today.

Branch model

From the repo's README:

  1. Clone and open the project.
  2. Start from the dev branch before starting any work.
  3. Create a separate feature branch from dev. Do not commit directly to dev/uat/main. PR back into dev.
  4. Merge devuat for QA.
  5. Merge uatmain for production.

This matches the patterns used by someli-platform (dev_app/uat_app/main) and someli-api (dev_api/uat_api/main), but with the plain dev/uat/main naming used by the smaller repos. Because nothing automatically deploys this repo, the branch promotion is currently bookkeeping only.