Skip to content

Commit

Permalink
Merge pull request #120 from rajnandan1/release-candidate/0.0.16
Browse files Browse the repository at this point in the history
Release candidate/0.0.16
  • Loading branch information
rajnandan1 authored Nov 16, 2024
2 parents 3941cc4 + f80e19e commit 38c4439
Show file tree
Hide file tree
Showing 99 changed files with 5,304 additions and 1,157 deletions.
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NODE_ENV=production
PORT=3000
GH_TOKEN=your_github_token
API_TOKEN=your_api_token
API_IP=""
API_IP_REGEX=""
KENER_BASE_PATH=""
27 changes: 7 additions & 20 deletions .github/workflows/publishImage.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,56 @@
---
name: Publish Docker image to Dockerhub and GHCR

on:
push:
branches:
- 'main'
# add additional branches that should build to images here
# they will be tagged based on the branch name IE kener:test
#- 'test'
- main
tags:
- '*.*.*'
# don't trigger if just updating docs
- "*.*.*"
paths-ignore:
- 'docs.md'
- 'README.md'

- docs.md
- README.md
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
# only run if we've specified image tag to push to
if: ${{ vars.DOCKERHUB_IMAGE_NAME != '' || vars.GHCR_IMAGE_NAME != '' }}
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
if: ${{ github.event_name != 'pull_request' && vars.DOCKERHUB_IMAGE_NAME != '' }}
if: ${{ github.event_name != 'pull_request' && vars.DOCKERHUB_IMAGE_NAME != ''
}}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
if: ${{ github.event_name != 'pull_request' && vars.GHCR_IMAGE_NAME != '' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: |
${{ vars.DOCKERHUB_IMAGE_NAME }}
${{ vars.GHCR_IMAGE_NAME }}
# generate Docker tags based on the following events/attributes
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, 'main') }}
type=ref,event=branch,enable=${{ !endsWith(github.ref, 'main') }}
type=semver,pattern={{version}}
flavor: |
latest=false
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ vite.config.ts.timestamp-*
nodemon.json
.okgit/
config/static/*
!config/static/.kener
!config/static/.kener
db/*
!db/.kener
database/*
!database/.kener
src/lib/server/config/monitors.yaml
src/lib/server/config/site.yaml
27 changes: 11 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,11 @@ RUN \
# set OS timezone specified by docker ENV
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

ARG data_dir=/config
VOLUME $data_dir
ENV CONFIG_DIR=$data_dir


COPY docker/root/ /

# Dir ENVs need to be set before building or else build throws errors
ENV PUBLIC_KENER_FOLDER=/config/static \
MONITOR_YAML_PATH=/config/monitors.yaml \
SITE_YAML_PATH=/config/site.yaml


# build requires devDependencies which are not used by production deploy
# so build in a stage so we can copy results to clean "deploy" stage later
Expand All @@ -34,12 +29,9 @@ WORKDIR /app

COPY --chown=abc:abc . /app

# build requires PUBLIC_KENER_FOLDER dir exists so create temporarily
# -- it is non-existent in final stage to allow proper startup and chown'ing/example population
RUN mkdir -p "${CONFIG_DIR}"/static \
&& npm install \
RUN npm install \
&& chown -R root:root node_modules \
&& npm run kener:build
&& npm run build

FROM base as app

Expand All @@ -48,13 +40,16 @@ FROM base as app
COPY --chown=abc:abc package*.json ./
COPY --from=base /usr/local/bin /usr/local/bin
COPY --from=base /usr/local/lib /usr/local/lib
COPY --chown=abc:abc scripts /app/scripts

COPY --chown=abc:abc static /app/static
COPY --chown=abc:abc locales /app/locales
COPY --chown=abc:abc config /app/config
COPY --chown=abc:abc database /app/database
COPY --chown=abc:abc build.js /app/build.js
COPY --chown=abc:abc sitemap.js /app/sitemap.js
COPY --chown=abc:abc src/lib/server /app/src/lib/server
COPY --chown=abc:abc src/lib/helpers.js /app/src/lib/helpers.js

COPY --from=build --chown=abc:abc /app/build /app/build
COPY --from=build --chown=abc:abc /app/prod.js /app/prod.js
COPY --from=build --chown=abc:abc /app/main.js /app/main.js


ENV NODE_ENV=production
Expand Down
41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Kener - A Sveltekit NodeJS Status Page System

<p align="center">
<img src="https://kener.ing/ss.png" width="100%" height="auto" alt="kener example illustration">
<img src="https://kener.ing/newbg.png" width="100%" height="auto" class="rounded-lg shadow-lg" alt="kener example illustration">
</p>

<p align="center">
Expand All @@ -8,19 +10,23 @@
<a href="https://hub.docker.com/r/rajnandan1/kener"><img src="https://img.shields.io/docker/pulls/rajnandan1/kener" alt="Docker Kener" /></a>
</p>

#### 👉 Visit a live server [here](https://kener.ing)
#### [👉 Visit a live server](https://kener.ing)

#### [👉 Quick Start](https://kener.ing/docs/quick-start)

#### [👉 Documentation](https://kener.ing/docs)

#### 👉 Read the documentation [here](https://kener.ing/kener-docs)
## What is Kener?

# Kener - Status Page System
Kener: Open-source sveltekit status page tool, designed to make service monitoring and incident handling a breeze. It offers a sleek and user-friendly interface that simplifies tracking service outages and improves how we communicate during incidents. Kener integrates seamlessly with GitHub, making incident management a team effort—making.

Kener: Open-source Node.js status page tool, designed to make service monitoring and incident handling a breeze. It offers a sleek and user-friendly interface that simplifies tracking service outages and improves how we communicate during incidents. And the best part? Kener integrates seamlessly with GitHub, making incident management a team effort—making it easier for us to track and fix issues together in a collaborative and friendly environment.
It uses files to store the data.

It uses files to store the data. Other adapters are coming soon
Kener name is derived from the word "Kene" which means "how is it going" in Assamese, then .ing is added to make cooler.

## Features

**Monitoring and Tracking:**
### Monitoring and Tracking

- Real-time monitoring
- Polls HTTP endpoint or Push data to monitor using Rest APIs
Expand All @@ -29,11 +35,11 @@ It uses files to store the data. Other adapters are coming soon
- Cron-based scheduling for monitors. Minimum per minute
- Flexible monitor configuration using YAML. Define your own parsing for monitor being UP/DOWN/DEGRADED
- Construct complex API Polls - Chain, Secrets etc
- Supports a Default Status for Monitors. Example defaultStatus=DOWN if you dont hit API per minute with Status UP
- Supports a Default Status for Monitors. Example defaultStatus=DOWN if you don't hit API per minute with Status UP
- Supports base path for hosting in k8s
- Pre-built docker image for easy deployment

**Customization and Branding:**
### Customization and Branding

- Customizable status page using yaml or code
- Badge generation for status and uptime of Monitors
Expand All @@ -42,12 +48,12 @@ It uses files to store the data. Other adapters are coming soon
- Light + Dark Theme
- Internationalization support

**Incident Management:**
### Incident Management

- Create Incidents using Github Issues - Rich Text
- Or use APIs to create Incidents

**User Experience and Design:**
### User Experience and Design

- 100% Accessibility Score
- Easy installation and setup
Expand All @@ -64,13 +70,6 @@ It uses files to store the data. Other adapters are coming soon

- [Upptime](https://upptime.js.org/)

## Roadmap

- [x] Add api to create incident
- [x] Add docker file
- [ ] Add notification
- [ ] Add Mysql adapter

## Screenshots

![image](static/marken_90.png)
Expand All @@ -85,8 +84,8 @@ It uses files to store the data. Other adapters are coming soon

## Support Me

[Sponsor Me](https://github.com/sponsors/rajnandan1)
If you are using Kener and want to support me, you can do so by sponsoring me on GitHub or buying me a coffee.

<a href="https://www.buymeacoffee.com/rajnandan1"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=rajnandan1&button_colour=5F7FFF&font_colour=ffffff&font_family=Poppins&outline_colour=000000&coffee_colour=FFDD00" /></a>
[Sponsor Me Using Github](https://github.com/sponsors/rajnandan1)

<a href="https://www.paypal.com/paypalme/rajnandan1"><img style="height:90px;margin-left:-15px" src="static/paypal.png" /></a>
[Buy Me a Coffee](https://www.buymeacoffee.com/rajnandan1)
Loading

0 comments on commit 38c4439

Please sign in to comment.