Deployment

Kener can be deployed in multiple ways. You can use the pre-built docker image or build from source.

Prerequisites

Make sure you have the following installed:

NPM

npm i
npm run build
npm run prod

PM2

npm i
node build.js
pm2 start src/lib/server/startup.js
pm2 start main.js

Docker

Dockerhub

docker.io/rajnandan1/kener:latest

Github Packages

ghcr.io/rajnandan1/kener:latest

You should mount two host directories to persist your configuration and database. Environmental variables can be passed with -e An example docker run command:

Make sure ./database and ./config directories are present in the root directory

mkdir database
mkdir config
curl -o config/site.yaml https://raw.githubusercontent.com/rajnandan1/kener/refs/heads/main/config/site.example.yaml
curl -o config/monitors.yaml https://raw.githubusercontent.com/rajnandan1/kener/refs/heads/main/config/monitors.example.yaml
docker run \
  -v $(pwd)/database:/app/database \
  -v $(pwd)/config:/app/config \
  -p 3000:3000 \
  -e "GH_TOKEN=1234" \
  rajnandan1/kener

You can also use a .env file

docker run \
  -v $(pwd)/database:/app/database \
  -v $(pwd)/config:/app/config \
  --env-file .env \
  -p 3000:3000 \
  rajnandan1/kener

Or use Docker Compose with the example docker-compose.yaml

Using PUID and PGID

If you are

then you must set the environmental variables PUID and PGID. in the container in order for it to generate files/folders your normal user can interact it.

Run these commands from your terminal

  • id -u -- prints UID for PUID
  • id -g -- prints GID for PGID

Then add to your docker command like so:

docker run -d ... -e "PUID=1000" -e "PGID=1000" ... rajnandan1/kener

or substitute them in docker-compose.yml

Base path

By default kener runs on / but you can change it to /status or any other path. Read more about it here