How to start with development
- Run:
 
bin/develop.sh
- Enjoy your coffee ;-)
 - Laravel will serve web at [http://localhost:8000] (which redirect to API documentation)
 - Requirements: Docker, Docker Compose v2, Bash
 
How to try API
- for example, via swagger ([http://localhost:8000/api/documentation])
 
How to create Czech public holidays:
docker compose exec -it php-fpm /var/www/html/artisan app:create-holidays CZ 2024
Tests
docker compose exec --env OTEL_PHP_DISABLED_INSTRUMENTATIONS=all php-fpm vendor/bin/phpunit
phpstan & cs
docker compose exec --env OTEL_PHP_DISABLED_INSTRUMENTATIONS=all php-fpm vendor/bin/phpcs
docker compose exec --env OTEL_PHP_DISABLED_INSTRUMENTATIONS=all php-fpm vendor/bin/phpstan --memory-limit=2G
Swagger:
regenerate swagger:
docker compose exec -it php-fpm /var/www/html/artisan l5-swagger:generate
Logs:
- Logs in storage/logs/laravel.log file
 
Traces:
- Traces are saved into Tempo and are available via Grafana at http://localhost:3000
 
Containers:
- php-fpm -> FPM and tooling
 - nginx -> Serving static content, proxy to FPM
 - mysql -> Database
 - grafana, tempo, loki, promtail, prometheus -> Monitoring stack
 
TODO:
- Logs into loki
 - Better traces in Tempo (currently very basic)
 - Monitor the result of refresh-database via Prometheus
 - Monitor status codes via Prometheus
 - Sentry integration
 - Deployment to dev/test and prod, production settings, production Docker images
 - CI/CD
 
Notes
In real "production" code, the monitoring stack will be available from the dev/test environment. It doesn't make sense to have it on the local dev stack, but for this example, I thought it was good
Description
				
					Languages
				
				
								
								
									PHP
								
								76.3%
							
						
							
								
								
									Blade
								
								22.9%
							
						
							
								
								
									Shell
								
								0.6%
							
						
							
								
								
									JavaScript
								
								0.2%