forked from 0x2620/pandora
remove git repos from requirements.txt and add one place to set them up
This commit is contained in:
parent
87e580547f
commit
970f3f605d
5 changed files with 30 additions and 14 deletions
8
README
8
README
|
@ -56,13 +56,9 @@ You have to use the same password here and in BROKER_URL in local_settings.py
|
||||||
|
|
||||||
1) Get code from git
|
1) Get code from git
|
||||||
cd /srv/
|
cd /srv/
|
||||||
git clone --depth 1 https://git.0x260.org/pandora.git pandora
|
git clone https://git.0x260.org/pandora.git pandora
|
||||||
cd pandora
|
cd pandora
|
||||||
virtualenv --system-site-packages .
|
./ctl init
|
||||||
./bin/pip install -r requirements.txt
|
|
||||||
|
|
||||||
cd static
|
|
||||||
git clone --depth 1 https://git.0x2620.org/oxjs.git
|
|
||||||
|
|
||||||
cd /srv
|
cd /srv
|
||||||
chown -R pandora.pandora pandora
|
chown -R pandora.pandora pandora
|
||||||
|
|
23
ctl
23
ctl
|
@ -6,6 +6,29 @@ if [ -z "$1" ]; then
|
||||||
else
|
else
|
||||||
action="$1"
|
action="$1"
|
||||||
fi
|
fi
|
||||||
|
if [ "$action" = "init" ]; then
|
||||||
|
cd "`dirname "$0"`"
|
||||||
|
BASE=`pwd`
|
||||||
|
virtualenv --system-site-packages .
|
||||||
|
if [ ! -d static/oxjs ]; then
|
||||||
|
git clone --depth 1 https://git.0x2620.org/oxjs.git static/oxjs
|
||||||
|
fi
|
||||||
|
mkdir -p src
|
||||||
|
if [ ! -d src/oxtimelines ]; then
|
||||||
|
git clone --depth 1 https://git.0x2620.org/oxtimelines.git src/oxtimelines
|
||||||
|
fi
|
||||||
|
for package in oxtimelines python-ox; do
|
||||||
|
cd ${BASE}
|
||||||
|
if [ ! -d src/${package} ]; then
|
||||||
|
git clone --depth 1 https://git.0x2620.org/${package}.git src/${package}
|
||||||
|
fi
|
||||||
|
cd ${BASE}/src/${package}
|
||||||
|
${BASE}/bin/python setup.py develop
|
||||||
|
done
|
||||||
|
cd ${BASE}
|
||||||
|
./bin/pip install -r requirements.txt
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
if [ `whoami` != 'root' ]; then
|
if [ `whoami` != 'root' ]; then
|
||||||
echo you have to be root or run $0 with sudo
|
echo you have to be root or run $0 with sudo
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
Django==1.9.2
|
Django==1.9.2
|
||||||
-e git+https://git.0x2620.org/python-ox.git#egg=python-ox
|
|
||||||
-e git+https://git.0x2620.org/oxtimelines.git#egg=oxtimelines
|
|
||||||
simplejson
|
simplejson
|
||||||
chardet
|
chardet
|
||||||
celery==3.1.20
|
celery==3.1.20
|
||||||
|
|
|
@ -211,10 +211,11 @@ if __name__ == "__main__":
|
||||||
pandora_new_revno = revno
|
pandora_new_revno = revno
|
||||||
else:
|
else:
|
||||||
os.chdir(os.path.dirname(path))
|
os.chdir(os.path.dirname(path))
|
||||||
cmd = ['git', 'clone', '--depth', '1', repos[repo]['url']]
|
|
||||||
run(*cmd)
|
|
||||||
if 'revision' in repos[repo]:
|
if 'revision' in repos[repo]:
|
||||||
|
run('git', 'clone', repos[repo]['url'])
|
||||||
run_git(path, 'checkout', repos[repo]['commit'])
|
run_git(path, 'checkout', repos[repo]['commit'])
|
||||||
|
else:
|
||||||
|
run('git', 'clone', '--depth', '1', repos[repo]['url'])
|
||||||
setup = os.path.join(base, repos[repo]['path'], 'setup.py')
|
setup = os.path.join(base, repos[repo]['path'], 'setup.py')
|
||||||
if repo in ('python-ox', 'oxtimelines') and os.path.exists(setup):
|
if repo in ('python-ox', 'oxtimelines') and os.path.exists(setup):
|
||||||
os.chdir(os.path.dirname(setup))
|
os.chdir(os.path.dirname(setup))
|
||||||
|
|
|
@ -85,11 +85,9 @@ rabbitmqctl add_vhost /pandora
|
||||||
rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*"
|
rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*"
|
||||||
|
|
||||||
#pandora
|
#pandora
|
||||||
git clone --depth 1 https://git.0x2620.org/pandora.git /srv/pandora
|
git clone https://git.0x2620.org/pandora.git /srv/pandora
|
||||||
git clone --depth 1 https://git.0x2620.org/oxjs.git /srv/pandora/static/oxjs
|
|
||||||
virtualenv --system-site-packages /srv/pandora
|
|
||||||
cd /srv/pandora
|
cd /srv/pandora
|
||||||
./bin/pip install -r /srv/pandora/requirements.txt
|
./ctl init
|
||||||
|
|
||||||
HOST=$(hostname -s)
|
HOST=$(hostname -s)
|
||||||
HOST_CONFIG="/srv/pandora/pandora/config.$HOST.jsonc"
|
HOST_CONFIG="/srv/pandora/pandora/config.$HOST.jsonc"
|
||||||
|
|
Loading…
Reference in a new issue