improve readme

This commit is contained in:
mystie 2024-09-28 00:32:25 +03:00
parent 0a98041a23
commit da8b26ffb2

View file

@ -1,9 +1,9 @@
# ![catask icon](./static/icons/catask-32.png) CatAsk
# ![CatAsk icon](./static/icons/catask-32.png) CatAsk
a work-in-progress minimal single-user q&a software
> [!NOTE]
> catask is alpha software, therefore bugs are expected to happen
> CatAsk is alpha software, therefore bugs are expected to happen
## Prerequisites
- MySQL/MariaDB
@ -42,7 +42,7 @@ First, rename `.env.example` to `.env` and `config.example.json` to `config.json
`DB_PASS` - database password
`DB_PORT` - database port (usually 3306)
`ADMIN_PASSWORD` - password to access admin panel
`APP_SECRET` - application secret, generate one with this command: `python -c 'import secrets; print(secrets.token_hex())'`
`APP_SECRET` - application secret, generate one with this command: `python3 -c 'import secrets; print(secrets.token_hex())'`
### config.json
Configure in Admin panel after installing (located at `https://yourdomain.tld/admin/`)
@ -54,12 +54,15 @@ If that doesn't work (e.g. tables are missing), try importing schema.sql into th
## Usage
Use one of these commands to run CatAsk: `flask run` or `gunicorn -w 4 app:app` (if you have gunicorn installed) or `python app.py`
If you want CatAsk to be accessible on a specific host address, specify a `--host` option to `flask run` (e.g. `--host 0.0.0.0`)
For debugging, run `flask run` with `--debug` argument (`flask run --debug`)
Start CatAsk with this command:
```
gunicorn -w 4 app:app
```
If you want CatAsk to be accessible on a specific host address, specify a `--bind` option to `gunicorn -w 4 app:app` (e.g. `--bind 127.0.0.1:5000`)
For debugging, run `flask run --debug`
Admin login page is located at `https://yourdomain.tld/admin/login/`
Runs on `127.0.0.1:5000` (`flask run` or `python app.py`) or `127.0.0.1:8000` (`gunicorn -w 4 app:app`), may work in a production environment
Admin login page is located at `https://example.com/admin/login/`
Runs on `127.0.0.1:8000` by default
### Caddy
This repository contains an example Caddyfile that runs CatAsk on catask.localhost by reverse proxying it to 127.0.0.1:5000, you can modify it as needed