|
@ -159,8 +159,9 @@ else |
|
|
fi |
|
|
fi |
|
|
deactivate |
|
|
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 |
|
|
. /opt/venv/docker-compose/bin/activate |
|
|
EOF |
|
|
EOF |
|
|
fi |
|
|
fi |
|
@ -172,20 +173,25 @@ if ! [ -d "/opt/apps/0k-compose" ]; then |
|
|
fi |
|
|
fi |
|
|
[ -e /usr/local/bin/compose ] || ln -sfv /opt/apps/0k-compose/bin/compose /usr/local/bin/ |
|
|
[ -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. |
|
|
## if not provided, this will be the default service launched. |
|
|
export DEFAULT_SERVICES="" |
|
|
export DEFAULT_SERVICES="" |
|
|
|
|
|
|
|
|
export DEFAULT_PROJECT_NAME=$(hostname | cut -f 2 -d . ) |
|
|
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 |
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|