Remember your user must have appropriate permissions to make it work flawlessly. assuming docker desktop did not require sudo while hosts do if it is not like that feel free to edit ./build.sh file first
git clone git@github.com:zohaibtariq/swdocker.git
cd swdocker
chmod u+x ./*.sh
./build.sh
make sure you are inside docker cloned repo, if you have fast hands please wait few seconds (to boot mysql completely) before executing migration command.
docker exec -it php bash -c "cd api ; composer install"
make sure you are inside docker cloned repo, if you have fast hands please wait few seconds (to boot mysql completely) before executing migration command.
docker exec -it php bash -c "cd api ; php artisan migrate"
OR
docker exec -it php bash -c "cd api ; php artisan migrate:fresh"
docker exec -it php bash -c "cd api ; php artisan db:seed"
docker exec -it php bash -c "cd api ; php artisan config:clear ; php artisan cache:clear ; php artisan route:clear ; php artisan view:clear "
docker exec -it php bash -c "cd api ; php artisan test"
OR
docker exec -it php bash -c "cd api ; ./vendor/bin/phpunit --configuration phpunit.xml"
docker exec -it php bash -c "cd api ; php artisan l5-swagger:generate"
http://sw.api.local/
http://sw.api.local/api.docs
STEP 13 - setup postman by importing collection and environment file links are mentioned in another project repo
./down.sh
./up.sh
./remove.sh
mysql.env