Selaa lähdekoodia

Added .wsgi file

Max Halford 10 vuotta sitten
vanhempi
commit
df4415ba1c
3 muutettua tiedostoa jossa 10 lisäystä ja 4 poistoa
  1. 6 0
      app.wsgi
  2. 1 1
      deployment/Digital-Ocean.md
  3. 3 3
      deployment/Flask-Boilerplate.conf

+ 6 - 0
app.wsgi

@@ -0,0 +1,6 @@
+import sys, os, logging
+logging.basicConfig(stream=sys.stderr)
+sys.path.insert(0, '/var/www/Flask-Boilerplate')
+os.chdir('/var/www/Flask-Boilerplate')
+from run import app
+application = app

+ 1 - 1
deployment/Digital-Ocean.md

@@ -1,6 +1,6 @@
 # Digital Ocean deployment
 
-The following script sets everything up so that the application can be deployed on a [Digital Ocean](https://www.digitalocean.com/) droplet with Ubuntu 14.04 and the Apache web server. Of course you should go through it and modify the parts that are unique to your application, I've marked them with ``<>``.
+The following script sets everything up so that the application can be deployed on a [Digital Ocean](https://www.digitalocean.com/) droplet with Ubuntu 14.04 and the Apache web server. Of course you should go through it and modify the parts that are unique to your application, I've marked them with ``<>``. You will also have to change the ``app.wsgi`` and the ``Flask-Boilerplate.conf`` files, just open the files and replace the obvious stuff.
 
 ```sh
 # Login and change password

+ 3 - 3
deployment/Flask-Boilerplate.conf

@@ -1,13 +1,13 @@
 <VirtualHost *:80>
 		ServerName openbikes.co
 		ServerAdmin maxhalford25@gmail.com
-		WSGIScriptAlias / /var/www/OpenBikes/openbikes.wsgi
+		WSGIScriptAlias / /var/www/Flask-Boilerplate/app.wsgi
 		<Directory /var/www/OpenBikes/>
 			Order allow,deny
 			Allow from all
 		</Directory>
-		Alias /static /var/www/OpenBikes/static
-		<Directory /var/www/OpenBikes/static/>
+		Alias /static /var/www/Flask-Boilerplate/static
+		<Directory /var/www/Flask-Boilerplate/static/>
 			Order allow,deny
 			Allow from all
 		</Directory>