Go to file
2024-08-04 15:15:56 +02:00
assets feat(controller): add details controller 2024-08-04 14:13:33 +02:00
bin build: add bash for local-development 2024-08-04 15:15:55 +02:00
config build(monitoring): implement open-telemetry support 2024-08-04 15:15:55 +02:00
docker build(docker): add docker and docker-compose files 2024-08-04 15:15:55 +02:00
migrations build(migrations): initial version of database 2024-08-04 15:15:56 +02:00
public Add initial set of files 2024-07-29 13:38:42 +02:00
src feat(controller): add details controller 2024-08-04 15:15:55 +02:00
templates feat(controller): add details controller 2024-08-04 14:13:33 +02:00
tests feat(controller): add details controller 2024-08-04 14:13:33 +02:00
translations Add webapp packages 2024-07-29 13:39:02 +02:00
.env feat(command): add command for refresh database 2024-08-04 14:13:33 +02:00
.env.test Add webapp packages 2024-07-29 13:39:02 +02:00
.gitignore build(docker): add docker and docker-compose files 2024-08-04 15:15:55 +02:00
composer.json build(monitoring): implement open-telemetry support 2024-08-04 15:15:55 +02:00
composer.lock build(monitoring): implement open-telemetry support 2024-08-04 15:15:55 +02:00
docker-compose.yml build(docker): add docker and docker-compose files 2024-08-04 15:15:55 +02:00
Dockerfile.fpm build(docker): add docker and docker-compose files 2024-08-04 15:15:55 +02:00
Dockerfile.nginx build(docker): add docker and docker-compose files 2024-08-04 15:15:55 +02:00
Dockerfile.static build(docker): add docker and docker-compose files 2024-08-04 15:15:55 +02:00
package-lock.json feat(controller): add post lists controller 2024-08-04 14:13:33 +02:00
package.json feat(controller): add post lists controller 2024-08-04 14:13:33 +02:00
phpcs.xml.dist build(cs): add slevomat phpcs 2024-08-04 14:13:33 +02:00
phpstan.dist.neon build: add phpstan and phpcs 2024-08-03 20:46:59 +02:00
phpunit.xml.dist feat(controller): add post lists controller 2024-08-04 14:13:33 +02:00
README.md build: add README 2024-08-04 15:15:56 +02:00
symfony.lock build(monitoring): implement open-telemetry support 2024-08-04 15:15:55 +02:00
webpack.config.js feat(controller): add post lists controller 2024-08-04 14:13:33 +02:00

How to start with development

  • Run:
bin/develop.sh
  • Enjoy your coffee ;-)
  • Symfony will serve web at [http://localhost:8000]
  • Requirements: Docker, Docker Compose v2, Bash

How to import posts:

docker compose exec -it php-fpm bin/console brilo:refresh-database

How to develop static content:

docker compose run -it php-fpm /var/www/html/node_modules/.bin/encore dev

Tests

docker compose exec --env OTEL_PHP_DISABLED_INSTRUMENTATIONS=all php-fpm 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

Logs:

Traces:

Containers:

  • php-fpm -> FPM and tooling
  • nginx -> Serving static content, proxy to FPM
  • postgres -> Database
  • grafana, tempo, loki, promtail, prometheus -> Monitoring stack

TODO:

  • Add some validations, parsing of remote entities & use better db types than text (but there is no documentation of API...)
  • Custom error pages
  • Better traces in Tempo (currently very basic)
  • Monitor the result of refresh-database via Prometheus
  • Monitor 500/200 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