- Docker and docker-compose
cp .env.example .env
docker-compose up -d
docker-compose exec laravel php artisan migrate
docker-compose exec laravel php artisan storage:link
docker-compose exec laravel php artisan key:generate
cp .env.example .env.testing
docker-compose exec laravel php artisan test
Generate API docs
docker-compose exec laravel php artisan l5-swagger:generate
Access it in: http://localhost/api/docs
This project is deployed in an AWS EC2 instance, and it is accessible in: http://3.238.18.132/api/docs.
This project's Docker image can be found at: https://hub.docker.com/r/tiagoa/john-task-list
Clean the application
cp .env .env.production
docker-compose exec laravel php artisan cache:clear
rm -rf vendor
docker build -t <DOCKER_HUB_USERNAME>/john-task-list .
docker push <DOCKER_HUB_USERNAME>/john-task-list
Upload the docker-compose-production.yml in your production machine then spin up the containers:
docker-compose up -d
Run the migrations:
docker-compose exec app php artisan migrate
The PUT method needs to be POST with _method=PUT query parameter due to a bug in Laravel/Symfony.