Octo Events is an application that listens to Github Events via webhooks and expose by an api for later user.
Database: Postgresql
Ruby: 3.1.2
Rails: 7.0.4
To capture events from a especific repo on github, you should access the settings from repo.
-
Click on Webhooks option
-
Click on Add webhook
-
Fill Payload URL with domain app and use a basic auth same as example:
if your app settings is:
Domain: mydomain.com API User: xxx API Password: xxx
Fill Payload URL with:
https://xxx:xxx@mydomain.com/api/v1/events/webhook
To learn more about authentication, see Enviroments
-
Change content type to
application/json
-
Click on Save.
Variable | Description |
---|---|
DATABASE_HOSTNAME | database address |
DATABASE_USERNAME | database user |
DATABASE_PASSWORD | database password |
WEBHOOK_DOMAIN | Domain of the service that will be responsible for sending the webhooks |
USER | User used in authentication |
PASSWORD | Password used in authentication |
Start containers:
docker-compose up
Build containers:
docker-compose build
Access an container
docker-compose run --rm app bash
Connect to container
docker-compose run --rm app bash
Run command:
rspec
If you need to check test coverage:
RAILS_ENV=test rspec
After the command, open the file coverage/index.html
Start containers:
docker-compose up