set -e # WORKAROUND for koel:init crashing with # > In EncryptionServiceProvider.php line 42: # > No application encryption key has been specified. # 'php artisan key:generate' crashes the same way. APP_KEY_PATH=/etc/koel-app-key if [ ! -f $APP_KEY_PATH ]; then tr -dc '0-9a-zA-Z' $APP_KEY_PATH chmod u=rw,g=,o= $APP_KEY_PATH echo generated random APP_KEY fi export APP_KEY="$(cat $APP_KEY_PATH)" set -x # TODO run non-interactively # TODO do not run yarn install (part of build) php artisan koel:init # TODO use apache or nginx https://koel.phanan.net/docs/#/?id=manually php artisan serve --host=0.0.0.0 --port 8080