|
|
@ -13,7 +13,7 @@ wget http://docker.0k.io/get/ -qO - | bash |
|
|
|
clone_or_update() { |
|
|
|
local pkg="$1" branch=${2:-master} \ |
|
|
|
DEPLOY_PATH="/opt/apps" \ |
|
|
|
GIT_BASE="git.0k.io:/var/git/0k" \ |
|
|
|
GIT_BASE="https://git.myceliandre.fr/Myceliandre" \ |
|
|
|
current_branch |
|
|
|
if [ -d "$DEPLOY_PATH/$pkg" ]; then |
|
|
|
cd "$DEPLOY_PATH/$pkg" |
|
|
@ -38,16 +38,16 @@ install_bin() { |
|
|
|
|
|
|
|
set -e |
|
|
|
|
|
|
|
clone_or_update pandachi-manage || exit 1 |
|
|
|
install_bin /opt/apps/pandachi-manage/bin |
|
|
|
clone_or_update myc-manage || exit 1 |
|
|
|
install_bin /opt/apps/myc-manage/bin |
|
|
|
|
|
|
|
clone_or_update pandachi-deploy || exit 1 |
|
|
|
clone_or_update myc-deploy || exit 1 |
|
|
|
|
|
|
|
|
|
|
|
#[ -e /etc/compose.conf ] || ln -sfv /opt/apps/pandachi-deploy/etc/compose.conf /etc/compose.conf |
|
|
|
#[ -e /etc/compose.conf ] || ln -sfv /opt/apps/myc-deploy/etc/compose.conf /etc/compose.conf |
|
|
|
|
|
|
|
## XXXvlab: should get rid of this file in some future |
|
|
|
cd /opt/apps/pandachi-deploy |
|
|
|
cd /opt/apps/myc-deploy |
|
|
|
if ! grep "^DEFAULT_COMPOSE_FILE=$PWD/compose.yml$" /etc/compose/local.conf >/dev/null 2>&1; then |
|
|
|
echo "Adding CWD=$PWD to docker-compose." |
|
|
|
cat <<EOF >> /etc/compose/local.conf |
|
|
@ -57,10 +57,7 @@ fi |
|
|
|
|
|
|
|
type -t docker-clean || ln -sfv /opt/apps/0k-docker/src/bin/docker-clean /usr/local/bin |
|
|
|
|
|
|
|
echo "Login into our server." |
|
|
|
docker login -u deploy -p deployinvm git.panda-chi.io:5002 |
|
|
|
|
|
|
|
cd /opt/apps/pandachi-deploy |
|
|
|
cd /opt/apps/myc-deploy |
|
|
|
|
|
|
|
cat <<EOF > /root/.pgm.rc |
|
|
|
prefix_pg_local_command=" " ## otherwise, will default to sudo -u postgres |
|
|
@ -132,4 +129,4 @@ pip install ovh || exit 1 |
|
|
|
#compose --debug up odoo apache |
|
|
|
|
|
|
|
## Marker to probe if this script finished it's job |
|
|
|
echo "done" > /var/run/pandachi-installer.0k.io.state |
|
|
|
echo "done" > /var/run/myc-installer.0k.io.state |