#!/bin/sh
php -v

# COMPOSER
if [ ! -d "/producer/vendor" ]
then
    composer install
fi

# DATABASE
if [ ! -f "/producer/database/database.sqlite" ]
then
    touch /producer/database/database.sqlite
    php artisan migrate
fi

# HORIZON
sh /producer/.horizon/horizon.sh

php /producer/artisan serve --host "0.0.0.0"
