fix config read bug

changed install script just or vagrant
updated readme
このコミットが含まれているのは:
scragg 2014-10-23 22:22:30 -05:00
コミット 528c28fefe
5個のファイルの変更21行の追加67行の削除

ファイルの表示

@ -46,20 +46,11 @@ Easiest way.
pip install realms-wiki
### Install from Git
Use this method for development.
### Installing from Git (Ubuntu)
git clone https://github.com/scragg0x/realms-wiki
cd realms-wiki
The included install script should work for Ubuntu.
sudo bash install.sh
If it fails and you are running Ubuntu, open an issue.
Additional packages from the script are as follows:
sudo apt-get install -y software-properties-common python-software-properties
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
@ -67,6 +58,12 @@ Additional packages from the script are as follows:
sudo npm install -g bower
bower install
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
realms-wiki start
NodeJS is for installing [bower](http://bower.io) and it's used for pulling front end dependencies
### OSX / Windows
@ -86,8 +83,6 @@ Then execute the following in the terminal:
git clone https://github.com/scragg0x/realms-wiki
cd realms-wiki
vagrant up
vagrant ssh
realms-wiki dev
Check ```http://127.0.0.1:5000/``` to make sure it's running.

ファイルの表示

@ -3,17 +3,10 @@
# Provision script created for Ubuntu 14.04
APP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APP_USER="$( stat -c '%U' ${APP_DIR} )"
if [ -d "/vagrant" ]; then
# Control will enter here if $DIRECTORY exists.
APP_DIR="/vagrant"
APP_USER="vagrant"
fi
if [ "${APP_USER}" == "root" ]; then
echo "Installing app as root is not recommended"
echo "Username is determined by owner of application directory."
fi
echo "Provisioning..."
@ -46,55 +39,22 @@ libffi-dev libyaml-dev libssl-dev nodejs
# Install frontend assets
sudo npm install -g bower
sudo -iu ${APP_USER} bower --allow-root --config.cwd=${APP_DIR} --config.directory=realms/static/vendor --config.interactive=false install
sudo -iu ${APP_USER} virtualenv ${APP_DIR}/.venv
cd ${APP_DIR}
cd ${APP_DIR} && sudo -iu ${APP_USER} ${APP_DIR}/.venv/bin/pip install -r ${APP_DIR}/requirements-dev.txt
bower --config.interactive=false install
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
echo "Installing start scripts"
cat << EOF > /usr/local/bin/realms-wiki
#!/bin/bash
${APP_DIR}/realms-wiki "\$@"
${APP_DIR}/.venv/bin/realms-wiki "\$@"
EOF
sudo chmod +x /usr/local/bin/realms-wiki
cat << EOF > /etc/init/realms-wiki.conf
limit nofile 65335 65335
respawn
description "Realms Wiki"
author "scragg@gmail.com"
chdir ${APP_DIR}
env PATH=${APP_DIR}/.venv/bin:/usr/local/bin:/usr/bin:/bin:$PATH
env LC_ALL=en_US.UTF-8
env GEVENT_RESOLVER=ares
export PATH
export LC_ALL
export GEVENT_RESOLVER
setuid ${APP_USER}
setgid ${APP_USER}
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec gunicorn \
--name realms-wiki \
--access-logfile - \
--error-logfile - \
--worker-class gevent \
--workers 2 \
--bind 0.0.0.0:5000 \
--user ${APP_USER} \
--group ${APP_USER} \
--chdir ${APP_DIR} \
wsgi:app
EOF
realms-wiki start

ファイルの表示

@ -17,8 +17,10 @@ def read():
conf[k[7:]] = v
loc = get_path()
with open(loc) as f:
conf.update(json.load(f))
if loc:
with open(loc) as f:
conf.update(json.load(f))
for k in ['APP_PATH', 'USER_HOME']:
if k in conf:

ファイルの表示

@ -1 +1 @@
__version__ = '0.3.31'
__version__ = '0.4.0'

ファイルの表示

@ -9,9 +9,6 @@ DESCRIPTION = "Simple git based wiki"
with open('README.md') as f:
LONG_DESCRIPTION = f.read()
with open('requirements.txt') as f:
required = f.read().splitlines()
__version__ = None
exec(open('realms/version.py').read())