###
# THIS FILE ASSUMES THAT YOU HAVE THE LATEST VERSION OF DOCKER INSTALLED AND RUNNING
###

if [ ! -f ".env" ]; then
    cp env.dev .env
fi


# Make sure to update the .env file with the correct arguments
docker compose build app
docker compose up -d
docker compose exec  app php artisan key:generate

docker compose exec app php artisan migrate:fresh --seed
docker compose exec app php artisan cache:clear
docker compose exec app php artisan config:clear
docker compose exec app php artisan route:clear

#docker compose exec app php artisan serve --port=$PORT --host=0.0.0.0







#You should be able to access the app at http://localhost:8000/