1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-22 05:42:54 +00:00

move external components to their own files (#319)

* move ldap to its own file
* add separate files for db and mail as well
* add new compose file to the default compose_file variable
* enhance setup.sh to add these new compose files if they are currently missing
This commit is contained in:
Felix Bartels
2020-01-15 13:26:30 +01:00
committed by GitHub
parent 70e9940b38
commit 3367b539b7
7 changed files with 165 additions and 122 deletions
+23 -2
View File
@@ -326,7 +326,7 @@ INSECURE=$INSECURE
# Docker Repository to push to/pull from
docker_repo=zokradonh
COMPOSE_PROJECT_NAME=kopano
COMPOSE_FILE=docker-compose.yml:docker-compose.ports.yml
COMPOSE_FILE=docker-compose.yml:docker-compose.ports.yml:docker-compose.db.yml:docker-compose.ldap.yml:docker-compose.mail.yml
# Modify below to build a different version, than the kopano nightly release
#KOPANO_CORE_REPOSITORY_URL=https://serial:REPLACE-ME@download.kopano.io/supported/core:/final/Debian_9.0/
@@ -347,10 +347,31 @@ EOF
else
if ! grep -q COMPOSE_FILE ./.env; then
echo "Adding COMPOSE_FILE setting to .env"
echo "Adding COMPOSE_FILE setting to .env (for docker-compose.ports.yml)"
echo "COMPOSE_FILE=docker-compose.yml:docker-compose.ports.yml" >> ./.env
fi
if ! grep -q docker-compose.db.yml ./.env; then
echo "Adding docker-compose.db.yml to COMPOSE_FILE variable in .env"
cfvalue="$(grep COMPOSE_FILE ./.env)"
sed -i "/^COMPOSE_FILE=/d" ./.env
echo "$cfvalue:docker-compose.db.yml" >> ./.env
fi
if ! grep -q docker-compose.ldap.yml ./.env; then
echo "Adding docker-compose.ldap.yml to COMPOSE_FILE variable in .env"
cfvalue="$(grep COMPOSE_FILE ./.env)"
sed -i "/^COMPOSE_FILE=/d" ./.env
echo "$cfvalue:docker-compose.ldap.yml" >> ./.env
fi
if ! grep -q docker-compose.mail.yml ./.env; then
echo "Adding docker-compose.mail.yml to COMPOSE_FILE variable in .env"
cfvalue="$(grep COMPOSE_FILE ./.env)"
sed -i "/^COMPOSE_FILE=/d" ./.env
echo "$cfvalue:docker-compose.mail.yml" >> ./.env
fi
echo ".env already exists with initial configuration"
echo "If you want to change the configuration, please edit .env directly"
exit 1