From 400a27ad965d49ff6a1df706010b212a78259d32 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 24 Jul 2022 16:05:13 +0200 Subject: deploy and wsgi. --- deploy.sh | 14 ++++++++++---- wsgi.py | 5 +++++ 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 wsgi.py diff --git a/deploy.sh b/deploy.sh index 218da17..5cad7a4 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,7 +1,13 @@ #! /bin/bash -remote='root@192.162.71.223:/var/www/apps.mlnp.fr/mdl' +remote_app='mpeter@192.162.71.223:/home/mpeter/apps/mdl' +remote_static='mpeter@192.162.71.223:/var/www/apps.mlnp.fr' -echo Deploying now. -rsync -razvP . $remote -echo successfully deployed. +echo Deploying app: +rsync -azvP . $remote_app --chown=mpeter:www-data\ + --exclude={'.venv','.git','downloads','app/__pycache__',}\ + --exclude 'app/mdl.db' # Files +echo Deploying static files: +rsync -azvP ./app/static $remote_static --chown=mpeter:www-data +echo App deployed to $remote_app +echo Static files to $remote_static. diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..49d360e --- /dev/null +++ b/wsgi.py @@ -0,0 +1,5 @@ +# -*- mode: python; -*- + +from app import create_app + +app = create_app() -- cgit v1.2.3