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:
- Node.js
- npm
- Make sure
./database
and./config
directories are present in the root directory - config/site.yaml Contains information about the site
- config/monitors.yaml Contains your monitors and their related specifications
- Set up Environment Variables. You can use a
.env
file or pass them as arguments. Be sure to addNODE_ENV=production
for production deployment
NPM
npm i
npm run build #build the frontend
npm run configure #build the backend
npm run prod
PM2
npm i
npm run build #build the frontend
npm run configure #build the backend
pm2 start src/lib/server/startup.js
pm2 start main.js
Docker
docker.io/rajnandan1/kener:latest
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
- running on a linux host (ie unraid) and
- not using rootless containers with Podman
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 PUIDid -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