Installing - foxtrt-com/cdn GitHub Wiki

Install pre-requisites

sudo apt install python3.12, python3-pip, git, python3-venv

Clone repo

cd /usr/local

git clone https://github.com/foxtrt-com/cdn.git

Setup venv

cd cdn

python3.12 -m venv venv

Install requirements & init db

source venv/bin/activate

pip install -r requirements.txt

flask --app app init-db

deactivate

Configure SECRET_KEY

python3.12 -c 'import secrets; print(secrets.token_hex())'

echo "SECRET_KEY = 'PUT YOUR KEY HERE'" > ./instance/config.py

Create service file

nano /etc/systemd/system/foxtrtcdn.service

[Unit]
Description=Foxtrt.com CDN application
After=network.target

[Service]
WorkingDirectory=/usr/local/cdn
ExecStart=/usr/local/cdn/venv/bin/waitress-serve --call app:create_app
Restart=always

[Install]
WantedBy=multi-user.target

Enable service

sudo systemctl daemon-reload
sudo systemctl enable foxtrtcdn