# Clone the API repo
git clone https://github.com/jlbelanger/food-api.git
cd food-api
# Configure the environment settings
cp .env.example .env
# Install dependencies
composer install
# Generate key
php artisan key:generate
# Run database migrations
php artisan migrate
php artisan db:seed
# Set permissions
chown -R www-data:www-data storage
# Create account with username "test" and password "password" (or reset existing account password to "password")
php artisan reset-auth
Then, setup the Food Tracker app.
./vendor/bin/phpcs
./vendor/bin/phpunit
Essentially, to set up the repo on the server:
git clone https://github.com/jlbelanger/food-api.git
cd food-api
cp .env.example .env
# Then configure the values in .env.
composer install
php artisan key:generate
php artisan migrate
chown -R www-data:www-data storage
For subsequent deploys, push changes to the main branch, then run the following on the server:
cd food-api
git fetch origin
git pull
composer install
php artisan config:clear
Note: The deploy script included in this repo depends on other scripts that only exist in my private repos. If you want to deploy this repo, you'll have to create your own script.
./deploy.sh