No description
Find a file
2024-09-19 18:38:57 +03:00
static 1.4.0-alpha 2024-09-19 18:29:12 +03:00
templates 1.4.0-alpha 2024-09-19 18:29:12 +03:00
.env.example 1.4.1-alpha - hotfix 2024-09-19 18:34:51 +03:00
.gitignore 1.1.0-alpha 2024-09-07 23:22:26 +03:00
app.py 1.4.1-alpha - hotfix 2024-09-19 18:34:51 +03:00
Caddyfile 1.1.0-alpha 2024-09-07 23:22:26 +03:00
CHANGELOG.md update changelog 2024-09-19 18:38:57 +03:00
config.example.json 1.4.0-alpha 2024-09-19 18:29:12 +03:00
constants.py 1.4.1-alpha - hotfix 2024-09-19 18:34:51 +03:00
functions.py 1.4.1-alpha - hotfix 2024-09-19 18:34:51 +03:00
LICENSE Initial commit 2024-08-25 13:38:22 -04:00
README.md 1.4.0-alpha 2024-09-19 18:29:12 +03:00
requirements.txt 1.3.0-alpha 2024-09-12 18:25:02 +03:00
roadmap.md 1.4.0-alpha 2024-09-19 18:29:12 +03:00
schema.sql 1.4.0-alpha 2024-09-19 18:29:12 +03:00
UPDATE.md 1.4.0-alpha 2024-09-19 18:29:12 +03:00
wordlist.txt version 0.1.0 2024-08-27 22:43:46 +03:00

catask icon CatAsk

a work-in-progress minimal single-user q&a software

Note

catask is alpha software, therefore bugs are expected to happen

Prerequisites

  • MySQL/MariaDB
  • Python 3.10+ (3.12+ recommended)

Install

Clone this repository: git clone https://git.gay/mst/catask.git

VPS-specific

Go into the cloned repository, create a virtual environment and activate it:

Linux

python -m venv venv && . venv/bin/activate

Windows (PowerShell)

python -m venv venv; .\venv\Scripts\activate


After that, install required packages:
pip install -r requirements.txt

Shared hosting-specific

If your shared hosting provider supports WSGI, FastCGI, or something similar, use it (technically any CGI protocol could work)

Post-install

Configuration

First, rename .env.example to .env and config.example.json to config.json, then configure all the values below:

.env

DB_HOST - database host (usually 127.0.0.1)
DB_NAME - database name
DB_USER - database user
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())'

config.json

Configure in Admin panel after installing (located at https://yourdomain.tld/admin/)


After you're done configuring CatAsk, init the database: flask init-db
If that doesn't work (e.g. tables are missing), try importing schema.sql into the created database manually

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)

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

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

Updating

For instructions with updating from one version to another, check UPDATE.md file
Check CHANGELOG.md file for release notes