This is a WIP/POC to move the API over to a Laravel backend.
Open Brewery DB API utilizes Laravel Sail to create a Docker development environment. As a result Docker is the only requirement to get started.
To get started developing follow the steps below after you've installed Docker, this will ensure a container is built and the necessary dependencies are installed.
- Clone the repository
gh repo clone alexjustesen/obdb-api
- CD into the project
cd obdb-api
- Run the install script
./install.sh
You only need to run "First Time Setup", the first time. After that you can use the core commands below.
- Start the development environment
./vendor/bin/sail up -d
- Stop the development environment
./vendor/bin/sail down
- Refresh the database structure
./vendor/bin/sail migrate:fresh --force
- To import latest brewery data run
./vendor/bin/sail artisan app:import-breweries
- To refresh the search index run
./vendor/bin/sail artisan app:refresh-search-indexes
Still working on 100% coverage but API specs can be found in the wiki for now, Swagger docs are planned.