KvGeijer / schedule-lock

A way to reserve a shared resource, such as a server, through a website.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WIP: just a simple way to reserve time on a shared resource. No enforcement on the sharing.

Requirements:

pip install Flask Flask-SQLAlchemy Flask-Migrate Flask-Login python-dateutil

Setting up the database:

flask db init
flask db migrate -m "Initial migration."
flask db upgrade

generating a secret key for password encryption:

python -c 'import secrets; print(secrets.token_hex())'

Then create a python file config.py with

SECRET_KEY=<your secret key>

Setting it up as a server

The easiest way I found was hosting the server locally with Waitress and then setting up a reverse-proxy with Caddy to expose it as a https-server to the internet. For example, this could be a caddyfile:

https://www.dcs-servers.tech http://www.dcs-servers.tech http://dcs-servers.tech {
    redir https://dcs-servers.tech{uri}
}

https://dcs-servers.tech {
    reverse_proxy localhost:8080
} 

as Waitress by default hosts on localhost:8080.

About

A way to reserve a shared resource, such as a server, through a website.


Languages

Language:JavaScript 45.4%Language:Python 35.4%Language:HTML 10.6%Language:CSS 8.6%