summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2022-07-24 16:02:08 +0200
committerMarius Peter <marius.peter@tutanota.com>2022-07-24 16:02:08 +0200
commit008b1b496070d9549707d7dd8c28175692eacf10 (patch)
treeaf724a62c92ce34156f4339afbfad2115c1556cb
parent6c45fccc53ed5344461672c412935129c8179863 (diff)
Deploying and WSGI.
-rwxr-xr-xdeploy.sh13
-rw-r--r--wsgi.py5
2 files changed, 18 insertions, 0 deletions
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..2b13543
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,13 @@
+#! /bin/bash
+
+remote_app='mpeter@192.162.71.223:/home/mpeter/apps/farm-manager'
+remote_static='mpeter@192.162.71.223:/var/www/apps.mlnp.fr'
+
+echo Deploying app:
+rsync -azvP . $remote_app --chown=mpeter:www-data\
+ --exclude={'.venv','.git','app/__pycache__',}\
+ --exclude 'app/fapg.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()
Copyright 2019--2024 Marius PETER