dnd3.kad Core
Brought to you by:
kadmillos
Atuin is Scalebox's Flask web application skeleton
Install all:
apt-get install python-dev
pip install -U flask flask-login sqlalchemy flask-sqlalchemy flask-cache flask-babel flask-migrate requests markdown passlib blinker
./dev.py runserver
or, for external use
./dev.py external
apt-get install python-dev
apt-get install uwsgi-plugin-python uwsgi-plugin-http
sudo su -
uWSGI works in Emperor mode. So we only need to configure the workers (vassals).
create link in /etc/uwsgi/apps-available
ln -s /home/project/prj/uwsgi.ini /etc/uwsgi/apps-available/project.ini
activate it
ln -s /etc/uwsgi/apps-available/project.ini /etc/uwsgi/apps-enabled/project.ini
start the emperor
service uwsgi start
Installation
apt-get install nginx
create file /etc/nginx/sites-available/project with following content
upstream bt_app_server {
server 127.0.0.1:3032;
}
server {
listen 80;
server_name localhost;
location /static {
alias /home/project/prj/static/;
}
location /static/bootstrap {
alias /home/project/prj/static/bootstrap/;
expires 24h;
}
location / {
try_files $uri @proxy_to_app;
}
location @proxy_to_app {
uwsgi_pass bt_app_server;
include uwsgi_params;
}
}
activate it
ln -s /etc/nginx/sites-available/project /etc/nginx/sites-enabled/project
./shell.py
with auth.models preloaded
./shell.py auth
FlaskAtuin uses Flask-migrate
./initdb.py db init
./initdb.py db upgrade
./initdb.py db migrate -m "description"
check the files and then apply
./initdb.py db upgrade