65 lines
1.3 KiB
Markdown
65 lines
1.3 KiB
Markdown
|
How to start with development
|
||
|
===
|
||
|
|
||
|
* **Requirements:**
|
||
|
* bash
|
||
|
* Docker with Docker Compose (v2) command
|
||
|
|
||
|
* **Run:**
|
||
|
```bash
|
||
|
develop.sh
|
||
|
```
|
||
|
* Enjoy your coffee ;-)
|
||
|
* Nette will serve the web at [http://localhost:8000].
|
||
|
|
||
|
---
|
||
|
|
||
|
Tests
|
||
|
---
|
||
|
Run the following command to execute the tests:
|
||
|
|
||
|
```bash
|
||
|
docker compose exec php-fpm vendor/bin/phpunit
|
||
|
```
|
||
|
|
||
|
---
|
||
|
|
||
|
PHPStan & CS
|
||
|
---
|
||
|
|
||
|
* Run PHP CodeSniffer:
|
||
|
```bash
|
||
|
docker compose exec php-fpm vendor/bin/phpcs
|
||
|
```
|
||
|
* Run PHPStan with increased memory limit:
|
||
|
```bash
|
||
|
docker compose exec php-fpm vendor/bin/phpstan --memory-limit=2G
|
||
|
```
|
||
|
|
||
|
---
|
||
|
|
||
|
Containers
|
||
|
---
|
||
|
|
||
|
* `php-fpm` - FPM and additional tooling
|
||
|
* `nginx` - Serves static content, proxies requests to FPM
|
||
|
* `mariadb` - Database
|
||
|
|
||
|
---
|
||
|
|
||
|
TODO
|
||
|
---
|
||
|
|
||
|
* [ ] The current tests are just two unit tests. It definitely needs testing of individual pages, but I haven't had time to set up Codeception (which I would like to use), and the framework itself doesn't offer much.
|
||
|
* [ ] Add a monitoring stack (Prometheus, Otel, Loki, Grafana, etc.).
|
||
|
* [ ] Integrate Sentry.
|
||
|
* [ ] Establish deployment pipelines for dev/test and production environments. Configure production settings and Docker
|
||
|
images.
|
||
|
* [ ] Integrate CI/CD.
|
||
|
|
||
|
---
|
||
|
|
||
|
Notes
|
||
|
---
|
||
|
* Saving filters into session makes this app very unusable (back button etc.)
|