Changeset View
Changeset View
Standalone View
Standalone View
bin/quickstart.sh
Show All 28 Lines | |||||
rpm -qv php-mysqlnd >/dev/null 2>&1 || \ | rpm -qv php-mysqlnd >/dev/null 2>&1 || \ | ||||
test ! -z "$(php --ini | grep mysql)" || \ | test ! -z "$(php --ini | grep mysql)" || \ | ||||
die "Is php-mysqlnd installed?" | die "Is php-mysqlnd installed?" | ||||
test ! -z "$(php --modules | grep swoole)" || \ | test ! -z "$(php --modules | grep swoole)" || \ | ||||
die "Is swoole installed?" | die "Is swoole installed?" | ||||
base_dir=$(dirname $(dirname $0)) | test ! -z "$(cat /proc/cmdline | grep 'systemd.unified_cgroup_hierarchy=0')" || \ | ||||
die "systemd containers only work with cgroupv1 (use 'grubby --update-kernel=ALL --args=\"systemd.unified_cgroup_hierarchy=0\"' and a reboot to fix)" | |||||
docker pull docker.io/kolab/centos7:latest | |||||
docker-compose down --remove-orphans | base_dir=$(dirname $(dirname $0)) | ||||
docker-compose build | |||||
pushd ${base_dir}/src/ | pushd ${base_dir}/src/ | ||||
# Always reset .env with .env.example | # Always reset .env with .env.example | ||||
cp .env.example .env | cp .env.example .env | ||||
if [ -f ".env.local" ]; then | if [ -f ".env.local" ]; then | ||||
# Ensure there's a line ending | # Ensure there's a line ending | ||||
echo "" >> .env | echo "" >> .env | ||||
cat .env.local >> .env | cat .env.local >> .env | ||||
fi | fi | ||||
popd | popd | ||||
machniak: There's no meet container in master. | |||||
docker pull docker.io/kolab/centos7:latest | |||||
docker-compose down --remove-orphans | |||||
docker-compose build coturn kolab mariadb meet pdns-sql proxy redis nginx | |||||
bin/regen-certs | bin/regen-certs | ||||
docker-compose up -d coturn kolab mariadb meet pdns-sql proxy redis | docker-compose up -d coturn kolab mariadb meet pdns-sql proxy redis | ||||
pushd ${base_dir}/src/ | pushd ${base_dir}/src/ | ||||
rm -rf vendor/ composer.lock | rm -rf vendor/ composer.lock | ||||
php -dmemory_limit=-1 /bin/composer install | php -dmemory_limit=-1 $(which composer) install | ||||
npm install | npm install | ||||
find bootstrap/cache/ -type f ! -name ".gitignore" -delete | find bootstrap/cache/ -type f ! -name ".gitignore" -delete | ||||
./artisan key:generate | ./artisan key:generate | ||||
./artisan clear-compiled | ./artisan clear-compiled | ||||
./artisan cache:clear | ./artisan cache:clear | ||||
./artisan horizon:install | ./artisan horizon:install | ||||
if [ ! -f storage/oauth-public.key -o ! -f storage/oauth-private.key ]; then | if [ ! -f storage/oauth-public.key -o ! -f storage/oauth-private.key ]; then | ||||
./artisan passport:keys --force | ./artisan passport:keys --force | ||||
fi | fi | ||||
cat >> .env << EOF | cat >> .env << EOF | ||||
PASSPORT_PRIVATE_KEY="$(cat storage/oauth-private.key)" | PASSPORT_PRIVATE_KEY="$(cat storage/oauth-private.key)" | ||||
PASSPORT_PUBLIC_KEY="$(cat storage/oauth-public.key)" | PASSPORT_PUBLIC_KEY="$(cat storage/oauth-public.key)" | ||||
EOF | EOF | ||||
if [ ! -z "$(rpm -qv chromium 2>/dev/null)" ]; then | if rpm -qv chromium 2>/dev/null; then | ||||
chver=$(rpmquery --queryformat="%{VERSION}" chromium | awk -F'.' '{print $1}') | chver=$(rpmquery --queryformat="%{VERSION}" chromium | awk -F'.' '{print $1}') | ||||
./artisan dusk:chrome-driver ${chver} | ./artisan dusk:chrome-driver ${chver} | ||||
fi | fi | ||||
if [ ! -f 'resources/countries.php' ]; then | if [ ! -f 'resources/countries.php' ]; then | ||||
./artisan data:countries | ./artisan data:countries | ||||
fi | fi | ||||
npm run dev | npm run dev | ||||
popd | popd | ||||
docker-compose up -d worker nginx | docker-compose up -d nginx | ||||
pushd ${base_dir}/src/ | pushd ${base_dir}/src/ | ||||
rm -rf database/database.sqlite | rm -rf database/database.sqlite | ||||
./artisan db:ping --wait | ./artisan db:ping --wait | ||||
php -dmemory_limit=512M ./artisan migrate:refresh --seed | php -dmemory_limit=512M ./artisan migrate:refresh --seed | ||||
./artisan data:import | ./artisan data:import || : | ||||
# Instead of horizon for the local environment | |||||
./artisan queue:restart | |||||
./artisan queue:work --timeout=60 --tries 3 & | |||||
./artisan swoole:http stop >/dev/null 2>&1 || : | ./artisan swoole:http stop >/dev/null 2>&1 || : | ||||
./artisan swoole:http start | ./artisan swoole:http start | ||||
popd | popd | ||||
Not Done Inline Actionsnohup ./artisan please, not needed for swoole, that's properly daemonized vanmeeuwen: nohup ./artisan please,
redirect output to `>/dev/null 2>&1`
not needed for swoole, that's… | |||||
There's no meet container in master.