From 0a4dd14189a26ebaa5a8607c2ed3190bc8dc8e41 Mon Sep 17 00:00:00 2001 From: Kyle Mahan Date: Sat, 21 May 2016 07:38:19 -0700 Subject: [PATCH 1/2] add utility script to show remote logs --- log.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 log.sh diff --git a/log.sh b/log.sh new file mode 100755 index 0000000..15b5ff1 --- /dev/null +++ b/log.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +REMOTE_USER=kmahan +HOST=orin.kylewm.com + +ssh -t $REMOTE_USER@$HOST bash -c "' + +set -x + +sudo tail -n 60 -f /var/log/upstart/woodwind.log +'" From c8f7213b39f8bd8bdca463faa0145f004581d20f Mon Sep 17 00:00:00 2001 From: Kyle Mahan Date: Sat, 21 May 2016 08:00:09 -0700 Subject: [PATCH 2/2] fix the woefully outdated requirements and installation instructions fixes #53 fixes #54 Thanks for the heads up @Jeena (I guess I hadn't looked at the readme in about a year...) and sorry it was a pain to get running! --- README.md | 16 +++++++++++++--- woodwind-dev.ini | 6 +++--- woodwind.cfg.template | 4 +++- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 213a29a..d68f1e0 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ Supports mf2 h-feed and xml feeds (thanks to Universal Feed Parser). Installation ---------- -How to run your own instance of Woodwind. The default configuration -uses SQLite, so no database setup is necessary. +How to run your own instance of Woodwind. You'll first need to make +sure you have *Postgres* and *Redis* installed and running. ```bash git clone https://github.com/kylewm/woodwind.git @@ -22,14 +22,24 @@ Set up the virtualenv and install dependencies. ```bash virtualenv --python=/usr/bin/python3 venv +source venv/bin/activate pip install -r requirements.txt ``` -Use the basic SQLite configuration, create database tables and run Woodwind. +Copy woodwind.cfg.template to woodwind.cfg and edit it to check the +Postgres connection string. + +Then create database tables and run Woodwind. ```bash +# create the postgres database +createdb woodwind +# copy and edit the configuration file cp woodwind.cfg.template woodwind.cfg +nano woodwind.cfg +# create the database tables python init_db.py +# finally run the application uwsgi woodwind-dev.ini ``` diff --git a/woodwind-dev.ini b/woodwind-dev.ini index 3a97168..e3de209 100644 --- a/woodwind-dev.ini +++ b/woodwind-dev.ini @@ -1,9 +1,9 @@ [uwsgi] master=true processes=1 -socket=/tmp/woodwind.sock -chmod-socket=666 -#http-socket=:3000 +#socket=/tmp/woodwind.sock +#chmod-socket=666 +http-socket=:3000 module=woodwind.wsgi import=timers attach-daemon=rqworker high low diff --git a/woodwind.cfg.template b/woodwind.cfg.template index 9c18155..90a2ae8 100644 --- a/woodwind.cfg.template +++ b/woodwind.cfg.template @@ -5,9 +5,11 @@ DEBUG = True DEBUG_TB_INTERCEPT_REDIRECTS = False SECRET_KEY = 'super secret key' -SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.getcwd() + '/db.sqlite' +SQLALCHEMY_DATABASE_URI = 'postgres:///woodwind' PER_PAGE = 100 # client secret and key for fetch twitter contexts from granary.appspot.com TWITTER_AU_KEY = '...' TWITTER_AU_SECRET = '...' + +SQLALCHEMY_TRACK_MODIFICATIONS = False