This project aims to be as a base for reutilizable Laravel packages used for multipurpose stuff. The laravel libraries are located on the packages
folder under de Kirby vendor name. Here are some things this package currently does:
- Authentication API
- Employees API
- Employees Time Clock API
- Work shifts API
- Employee Novelties API
- Novelty types API
- Company API
- Users API
# setup mysql
brew install mysql
brew services start mysql
mysql -u root -e "CREATE USER 'homestead'@'localhost' IDENTIFIED BY 'secret';"
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'homestead'@'localhost' WITH GRANT OPTION;"
mysql -u root -e "CREATE DATABASE IF NOT EXISTS test"
mysql -u root -e "CREATE DATABASE IF NOT EXISTS kirby_local"
git clone https://github.com/llstarscreamll/kirby-api.git
cd kirby-api
composer install
cp .env.example .env # fill the environment variables
php artisan migrate --seed
php artisan passport:install # fill the environment variables based on output
php artisan company:sync-holidays # use the --nex-year flag to sync next year holidays
Make sure to have your .env
file, server and Github ssh
keys correctly established on your local and remote instances. To make a full deploy execute:
envoy run deploy --target=prod
To deploy only the code:
envoy run deployOnlyCode
If you want to deploy to specific server and branch execute:
envoy run deploy --target=lab --branch=staging
To use --target=lab
flag you must have in your environment LAB_SERVERS
. Example:
# separate servers with semicolons
LAB_SERVERS="john_doe@1.2.3.4;john_doe@5.6.7.8"