Changeset View
Changeset View
Standalone View
Standalone View
bin/quickstart.sh
Show All 10 Lines | rpm -qv docker-compose >/dev/null 2>&1 || \ | ||||
test ! -z "$(which docker-compose 2>/dev/null)" || \ | test ! -z "$(which docker-compose 2>/dev/null)" || \ | ||||
die "Is docker-compose installed?" | die "Is docker-compose installed?" | ||||
test ! -z "$(grep 'systemd.unified_cgroup_hierarchy=0' /proc/cmdline)" || \ | test ! -z "$(grep 'systemd.unified_cgroup_hierarchy=0' /proc/cmdline)" || \ | ||||
die "systemd containers only work with cgroupv1 (use 'grubby --update-kernel=ALL --args=\"systemd.unified_cgroup_hierarchy=0\"' and a reboot to fix)" | die "systemd containers only work with cgroupv1 (use 'grubby --update-kernel=ALL --args=\"systemd.unified_cgroup_hierarchy=0\"' and a reboot to fix)" | ||||
base_dir=$(dirname $(dirname $0)) | base_dir=$(dirname $(dirname $0)) | ||||
# Always reset .env with .env.example | |||||
cp src/.env.example src/.env | |||||
if [ -f "src/env.local" ]; then | |||||
# Ensure there's a line ending | |||||
echo "" >> src/.env | |||||
cat src/env.local >> src/.env | |||||
fi | |||||
export DOCKER_BUILDKIT=0 | export DOCKER_BUILDKIT=0 | ||||
COMPOSE_ARGS= | COMPOSE_ARGS= | ||||
if [ "$1" != "--nodev" ]; then | if [ "$1" != "--nodev" ]; then | ||||
COMPOSE_ARGS="-f docker-compose.yml -f docker-compose.local.yml" | COMPOSE_ARGS="-f docker-compose.yml -f docker-compose.local.yml" | ||||
fi | fi | ||||
docker-compose down --remove-orphans | docker-compose down --remove-orphans | ||||
docker volume rm kolab_mariadb || : | docker volume rm kolab_mariadb || : | ||||
docker volume rm kolab_imap || : | docker volume rm kolab_imap || : | ||||
docker volume rm kolab_ldap || : | docker volume rm kolab_ldap || : | ||||
if [ "$1" != "--nodev" ]; then | # We can't use the following artisan commands because it will just block if redis is unavailable: | ||||
src/artisan octane:stop >/dev/null 2>&1 || : | # src/artisan octane:stop >/dev/null 2>&1 || : | ||||
src/artisan horizon:terminate >/dev/null 2>&1 || : | # src/artisan horizon:terminate >/dev/null 2>&1 || : | ||||
else | # we therefore just kill all artisan processes running. | ||||
# If we switch from an existing development setup to a compose deployment, | |||||
# we don't have a nice way to terminate octane/horizon. | |||||
# We can't use the artisan command because it will just block if redis is, | |||||
# no longer available, so we just kill all artisan processes running. | |||||
pkill -9 -f artisan || : | pkill -9 -f artisan || : | ||||
fi | pkill -9 -f swoole || : | ||||
bin/regen-certs | bin/regen-certs | ||||
docker-compose build coturn kolab mariadb meet pdns proxy redis haproxy | docker-compose build coturn kolab mariadb meet pdns proxy redis haproxy | ||||
docker-compose ${COMPOSE_ARGS} up -d coturn kolab mariadb meet pdns redis | docker-compose ${COMPOSE_ARGS} up -d coturn kolab mariadb meet pdns redis | ||||
# Workaround until we have docker-compose --wait (https://github.com/docker/compose/pull/8777) | # Workaround until we have docker-compose --wait (https://github.com/docker/compose/pull/8777) | ||||
function wait_for_container { | function wait_for_container { | ||||
container_id="$1" | container_id="$1" | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |