No login, no javascript, just short links.
Deploy this app to Linode with a free $100 credit!
sudo mkdir -p /opt/schort
sudo groupadd schort
sudo useradd -d /opt/schort -g schort -M -s /sbin/nologin schort
sudo chown -R schort:schort /opt/schort
sudo -u schort git clone https://github.com/sqozz/schort.git /opt/schort
sudo chmod 770 /opt/schort/data
sudo -u schort virtualenv /opt/schort/venv
sudo -u schort -s
source ./venv/bin/activate
pip install -r requirements.txt
/usr/bin/uwsgi --master --daemonize /dev/null --disable-logging --plugin python39 --wsgi-file /opt/schort/schort.wsgi --post-buffering 1 --enable-threads --socket /tmp/uwsgi_schort.sock --processes 1 --fileserve-mode /opt/schort/schort.wsgi --pidfile /var/run/uwsgi_schort/schort.pid
server {
listen 80;
listen [::]:80;
server_name schort.your.domain;
sendfile on;
client_max_body_size 20M;
keepalive_timeout 0;
location / { try_files $uri @schort; }
location @schort {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi_schort.sock;
}
}
Module | Explanation |
---|---|
Flask | Flask handels all HTTP-stuff in this application |
sqlite3 | In gentoo this useflag needs to be set while compiling python3 |
The schort.wsgi file can be set as UWSGI_PROGRAM if you use uWSGI. Keep in mind, that the UWSGI_DIR needs to be set to the path where schort.py resists. This is because schort is not installed in a global scope. Since schort.wsgi imports schort.py it needs his workspace in the same folder.
Please login to review this project.
No reviews for this project yet.
Comments (0)
Please login to join the discussion on this project.