The following steps are for installing the UFIS-BNB Laravel App with Laravel Sail.
Make sure you have Docker Desktop installed and running.
- Download - Docker Desktop https://www.docker.com/products/docker-desktop
Fork the UFIS-BNB repository on Bitbucket or Github.
Clone the forked repo onto your machine using your system's command line application.
$ git clone https://[your-repo-string]/ufis-bnb.git
Navigate to your newly-cloned app.
$ cd ufis-bnb
Create an alias for Sail.
$ alias sail='bash vendor/bin/sail'
Run the app in detached mode.
*NOTE: Sail is a CLI to interact with Laravel's default Docker environment. It comes shipped with newly created Laravel apps. The first time you run the
up command, a Docker container is being built on your machine so this could take several minutes.
$ sail up ‐d
**If you are on an M1 chip, you might get ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries
platform: linux/x86_64, in the mysql service section like so:
Then run sail up -d again.
Run the database seeders and migrations.
$ sail artisan migrate:fresh --seed
**If you get SQLSTATE[HY000] [2002] Connection refused (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE') here, try running sail artisan config:clear then running sail artisan migrate:fresh --seed again.
Access http://localhost in your browser.
Success!
Once you are done developing and would like to remove the container instance, you can run:
$ sail down && sail kill