Skip to content

yamisskey-dev/yamioti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yamioti

Automatic maintenance page redirector for sub domains using Cloudflare Workers and Better Stack monitoring.

During maintenance, visitors are redirected to the maintenance page served by yamisskey-down (MAINTENANCE_URL in wrangler.toml).

Setup

  1. Clone and install dependencies:
git clone https://github.com/yamisskey-dev/yamioti.git
cd yamioti
npm install
  1. Configure KV namespace:
wrangler kv:namespace create MAINTENANCE_KV

Add the output ID to wrangler.toml

  1. Set Better Stack API key:
wrangler secret put BETTERSTACK_API_KEY
  1. Deploy:
wrangler deploy
  1. Configure routes in Cloudflare dashboard:
  • Workers & Pages > yamioti > Triggers
  • Add Routes such as (hoge.)yami.ski/* for your sub domains

Usage

Manual Maintenance Mode

Enable:

wrangler kv:key put --binding=MAINTENANCE_KV maintenance_mode "true"

Disable:

wrangler kv:key put --binding=MAINTENANCE_KV maintenance_mode "false"

Check status:

wrangler kv:key get --binding=MAINTENANCE_KV maintenance_mode

Automatic Monitoring

The worker automatically redirects to maintenance page when:

  • Manual maintenance mode is enabled
  • Better Stack detects downtime for monitored domains

About

↪️ Automatic redirect to maintenance page based on Better Stack status

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors