Skip to content

Instantly share code, notes, and snippets.

@goneri
Created June 8, 2016 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goneri/c4735288c8498d1d0c7ed7b852e83adb to your computer and use it in GitHub Desktop.
Save goneri/c4735288c8498d1d0c7ed7b852e83adb to your computer and use it in GitHub Desktop.
#!/bin/bash
#https://github.com/pre-commit/pre-commit/issues/360
unset _OLD_VIRTUAL_PATH
[ -d venv ] || virtualenv -p /usr/bin/python3 venv
[ -d dci-control-server ] || git clone https://github.com/redhat-cip/dci-control-server
[ -d dci-ui ] || git clone https://github.com/redhat-cip/dci-ui
. venv/bin/activate
pip install -e dci-control-server
echo "SQLALCHEMY_DATABASE_URI = 'postgresql:///dci?host=${PWD}/dci-control-server/.db_dir'" >> dci-control-server/dci/settings.py
echo "FILES_UPLOAD_FOLDER = '${PWD}/tmp/var/lib/dci-control-server/files'" >> dci-control-server/dci/settings.py
(
cd dci-control-server
pg_ctl stop -D .db_dir/
./scripts/start_db.sh
./scripts/db_provisioning.py
./scripts/runtestserver.py &
)
(
cd dci-ui
npm install
gulp serve:dev
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment