Merge branch 'master' of github.com:makefu/bump

Conflicts:
	Readme.md
This commit is contained in:
makefu 2013-11-19 10:24:52 +01:00
commit c03d7b1675
7 changed files with 28 additions and 7 deletions

View file

@ -14,7 +14,7 @@ It is written as a replacement for the gorgeous sprunge.us
. bin/activate
cd bump
gunicorn -b 127.0.0.1:4000 init:app
./run.sh
## Configure nginx

View file

@ -6,6 +6,9 @@ import os
app = Flask(__name__)
storedir = os.path.join(app.root_path, 'store')
app.config['storedir'] = storedir
print("Storedir is %s" % storedir)
if not os.path.isdir(storedir):
os.mkdir(storedir)
def returns_plain(f):
@ -84,9 +87,4 @@ def generate_key():
if __name__ == "__main__":
app.debug = True
print("Storedir is %s" % storedir)
try:
os.mkdir(storedir)
except:
pass
app.run(host='0.0.0.0')

BIN
bump/static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -2,6 +2,5 @@ Flask==0.10.1
Jinja2==2.7.1
MarkupSafe==0.18
Werkzeug==0.9.4
distribute==0.6.31
gunicorn==18.0
itsdangerous==0.23

14
etc/bump.nginx.conf Normal file
View file

@ -0,0 +1,14 @@
server {
listen [::]:80;
server_name _;
access_log /var/log/nginx/log/note.log main;
error_log /var/log/nginx/log/note_error.log;
default_type text/plain;
location / {
proxy_pass http://127.0.0.1:4000/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

5
etc/bump.supervisor.conf Normal file
View file

@ -0,0 +1,5 @@
[program:bump]
command=sh run.sh
user=note
directory=/opt/bump
autorestart=true

5
run.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
set -ef
. bin/activate
cd bump
gunicorn -b 127.0.0.1:4000 init:app