Discover Packages
github.com/issue-notifier/issue-notifier-api
command
module
Version:
v0.0.0-...-08d4403
Opens a new window with list of versions in this module.
Published: Apr 29, 2021
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Issue Notifier API
The API service for the Issue Notifier website.
Feature Sets (yet to be implemented)
An API to fetch latest issues per repository on demand which will be called from the UI
Set of APIs to manage user preferences for frequency of emails
Feel free to raise PRs for the above mentioned features or you can also raise issues if you think you have a new feature request.
To run the service locally
Without Minikube
You need to have Go & PostgreSQL installed
Setup env vars
Setup the database. Run the commands in database.txt
file from psql command line
Run $ go run main.go
Swagger Page - http://localhost:8001/api/v1/swagger/index.html
With Minikube
You need to have docker, minikube, kubeseal , Go & PostgreSQL installed
$ minikube start
Register a new OAuth app in GitHub. Add Homepage URL and Authorization callback URL as http://<minikube ip>
. You can get your minikube ip by running the command
$ minikube ip
Use the Authorization callback URL, Client ID and Client Secret below for creating secrets and configmap
Run the following commands from root of the project
$ eval $(minikube docker-env)
$ docker build -t hemakshis/issue-notifier-api .
(also make sure to build hemakshi/issue-notifier image after this, details here - issue-notifier/issue-notifier )
$ cd deploy/development
$ kubectl apply -f namespace.yaml
$ kubectl -n issue-notifier create secret generic secrets --from-literal=dbPass=<pass> --from-literal=githubClientID=<client_id> --from-literal=githubClientSecret=<client_secret> --from-literal=sessionAuthKey=<auth_key> --dry-run -o yaml > secrets.yaml
$ kubeseal --controller-namespace=<kubeseal_namespace> --format=yaml < secrets.yaml > sealed-secrets.yaml
Update comfig-map.yaml
with your own Authorization callback URL and Client ID
Finally run $ kubectl apply -f sealed-secrets.yaml -f config-map.yaml -f postgres.yaml -f issue-notifier.yaml -f issue-notifier-api.yaml -f ingress-service.yaml
Create database and tables
$ kubectl -n issue-notifier exec -it <postgres_pod> -- /bin/bash
$ psql -h localhost -p 5432 -U postgres
Run the commands in database.txt file
In your browser go to http://<minikube_ip>/api/v1/health and you should get a response of {"status":"UP"}
Contribution
Raise a bug or a feature request
Keep checking the Issues tab.
Find & solve TODO
s in the source code and raise a PR
You can write unit tests!
Reach out to Hemakshi Sachdev for any queries.
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.