Browse Source

new: [host] update locations of ``compose``'s config files.

postgres
Valentin Lab 8 years ago
parent
commit
ba85876d09
  1. 22
      precise/host/hooks/install.d/70-0k.sh

22
precise/host/hooks/install.d/70-0k.sh

@ -159,8 +159,9 @@ else
fi
deactivate
if ! grep "^. /opt/venv/docker-compose/bin/activate$" /etc/compose.local.conf >/dev/null 2>&1; then
cat <<EOF >> /etc/compose.local.conf
mkdir -p /etc/compose
if ! grep "^. /opt/venv/docker-compose/bin/activate$" /etc/compose/local.conf >/dev/null 2>&1; then
cat <<EOF >> /etc/compose/local.conf
. /opt/venv/docker-compose/bin/activate
EOF
fi
@ -172,20 +173,25 @@ if ! [ -d "/opt/apps/0k-compose" ]; then
fi
[ -e /usr/local/bin/compose ] || ln -sfv /opt/apps/0k-compose/bin/compose /usr/local/bin/
cat <<EOF > /etc/default/datastore
DATASTORE=/srv/datastore
SNAPSHOT_BACKUP=/var/backups/snapshot
EOF
cat <<EOF > /etc/compose.conf
cat <<EOF > /etc/default/compose
## if not provided, this will be the default service launched.
export DEFAULT_SERVICES=""
export DEFAULT_PROJECT_NAME=$(hostname | cut -f 2 -d . )
export DOCKERSTORE=/srv/datastore
export DATASTORE=$DOCKERSTORE/data
export CONFIGSTORE=$DOCKERSTORE/config
export DOCKER_DATASTORE=\$([ -e /etc/default/datastore ] && . /etc/default/datastore && echo \$DATASTORE)
export DATASTORE=\$DOCKER_DATASTORE/data
export CONFIGSTORE=\$DOCKER_DATASTORE/config
EOF
mkdir -p /etc/compose
echo "DEFAULT_COMPOSE_FILE=/etc/compose/compose.yml" >> /etc/compose.local.conf
echo "DEFAULT_COMPOSE_FILE=/etc/compose/compose.yml" >> /etc/compose/local.conf
Loading…
Cancel
Save