7 Commits

Author SHA1 Message Date
70582003de feat: check code quality through git hooks (#105)
All checks were successful
continuous-integration/drone/push Build is passing
Add `git hooks` that execute common and repetitive tasks before committing and pushing to make developer life easier.

Reviewed-on: #105
Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
2024-11-02 13:29:32 +00:00
5e029670eb feat: execute test with docker compose (#101)
All checks were successful
continuous-integration/drone/push Build is passing
When we changed the application to be executed as distributed nodes (PR #96), performing tests with `docker-compose` became impossible.

To fix this situation in this PR, two new targets are added to `Makefile`:

* `compose_test`
* `compose_test_shell`

These new targets allow one to execute tests and enter the container shell responsible for running these tests.

Reviewed-on: #101
Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
2024-10-07 12:16:07 +00:00
9be7566cbb feat: execute service as distributed erlang (#96)
All checks were successful
continuous-integration/drone/push Build is passing
To create a cluster with distributed nodes, the following changes were made:

* Use [`dns_cluster`][0] to execute distributed nodes
* Add _script_ to execute distributed nodes locally

Also, improve local execution by:

* Use [`mix release`][1] to make easier [deploy `phoenix`][2]
* Use [`compose watch`][3] to synchronize code from the host with the service

Some minor improvements:

* Ignore files and folders in git and docker
* Remove boilerplate comments

[0]: https://github.com/phoenixframework/dns_cluster
[1]: https://hexdocs.pm/mix/Mix.Tasks.Release.html
[2]: https://hexdocs.pm/phoenix/releases.html
[3]: https://docs.docker.com/compose/how-tos/file-watch/

Co-authored-by: Joao P Dubas <joao.dubas@gmail.com>
Reviewed-on: #96
Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
2024-09-22 18:56:27 +00:00
4195fc615f feat: upgrade application dependencies (#93)
All checks were successful
continuous-integration/drone/push Build is passing
[Upgrade deps][0]:

* `absinthe` from 1.7.7 to 1.7.8
* `ecto` from 3.11.2 to 3.12.0
* `ecto_sql` from 3.11.3 to 3.12.0
* `gettext` from 0.24.0 to 0.25.0
* `jason` from 1.4.3 to 1.4.4
* `mix_audit` from 2.1.3 to 2.1.4
* `postgrex` from 0.18.0 to 0.19.0
* `prom_ex` from 1.9.0 to 1.10.0
* `telemetry_metrics` from 0.6.2 to 1.0.0

Install transient deps:

* `peep` to 3.2.0

Reviewed-on: #93

[0]: https://diff.hex.pm/diffs?diffs[]=absinthe:1.7.7:1.7.8&diffs[]=ecto:3.11.2:3.12.0&diffs[]=ecto_sql:3.11.3:3.12.0&diffs[]=gettext:0.24.0:0.25.0&diffs[]=jason:1.4.3:1.4.4&diffs[]=mix_audit:2.1.3:2.1.4&diffs[]=postgrex:0.18.0:0.19.0&diffs[]=prom_ex:1.9.0:1.10.0&diffs[]=telemetry_metrics:0.6.2:1.0.0
Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
2024-08-12 20:08:18 +00:00
7420139650 feat(ci): additional code/deps/security checks (#37)
To improve `CI` quality the following checks were added:

* compile warnings
* deprecated dependencies
* insecure dependencies
* unused dependencies
* code vulnerabilities

Also, to improve `CI` execution time, dependencies checks and lining were separated from the test pipeline.

Last, but not least, to make local development easier a `Dockerfile` was created to contain any system dependencies, and targets to handle database creation and migration were added.

Reviewed-on: #37
2023-11-11 20:35:45 +00:00
34c3a3e4c2 feat: expose system metrics (#4)
Use prom_ex to expose system metrics to prometheus and create dashboards.

Co-authored-by: Joao P Dubas <joao.dubas@gmail.com>
Reviewed-on: #4
2022-05-03 16:19:39 +00:00
e7df0322d7 Improve project usage (#6)
All checks were successful
continuous-integration/drone/push Build is passing
1. Ignore unnecessary files, such as `pgcli` log/history, and extra `docker-compose` definitions.
2. Add `Makefile` with common tasks.
3. Add git pre-commit hook to ensure project is always properly formatted.
4. Add [`btree_gist`][0] extension to `postgres`.

Reviewed-on: #6

[0]: https://www.postgresql.org/docs/14/btree-gist.html
2022-04-23 17:15:16 +00:00