docker-compose up -d
docker-compose down
Access the running container
docker exec -it php-fpm bash
Then you can run all the other steps sequentially without docker-compose exec php-fpm
docker-compose exec php-fpm composer install
.env
file from the .env.example
Generate app key
docker-compose exec php-fpm php artisan key:generate
Set permissions to storage
and public
folders
docker-compose exec php-fpm chmod -R 777 storage public
Create symbolic link from storage
to public
folders
docker-compose exec php-fpm php artisan storage:link
It will create and populate the tables
docker-compose exec php-fpm php artisan migrate:fresh --seed
docker-compose exec php-fpm php artisan make:migration <name>
docker-compose exec php-fpm php artisan make:migration <name> --table=<table>
Emails are sent in background
docker-compose exec php-fpm php artisan queue:work
Running API tests
docker-compose exec php-fpm php artisan test
Run tests using filter to specify tests to run
docker-compose exec php-fpm php artisan test --filter AddressTest
To create a test
docker-compose exec php-fpm php artisan make:test AddressTest
docker-compose exec php-fpm ./vendor/bin/pint
Application monitoring is done with Prometheus.
The endpoint that Prometheus scrapes is http://localhost/metrics
Application metrics can be visualized with Grafana.
Default login: admin/admin
We need to send emails to our customers in order to notify about a successful account creation or a payment.
To avoid going to external services to read those emails we can use MailHog to capture these emails for development purposes.