Backend service provides REST APIs for the Pipelines-Marketplace UI to interact with the database. It also povides file service by caching the YAML and README files from the Github reposiory provided by the user.
- Go 1.11.3
- PostgreSQL 10.6
- Fork and clone this repository
- Create a .env file with the following fields
GITHUB_TOKEN="c3ed7ada95145da8822103c86cbabeb4c503fa98"
POSTGRESQL_USERNAME=""
POSTGRESQL_PASSWORD=""
POSTGRESQL_DATABASE=""
HOST=""
PORT=
CLIENT_ID=""
CLIENT_SECRET=""
VALIDATION_API=""
Deploy the validation service from https://github.com/Pipelines-Marketplace/validation-service Get your Github Access token from https://github.com/settings/tokens
-
Install dependencies
go mod download
-
Restore the latest database backup by executing the below command with HOST, PORT, DB_NAME AND USER_NAME
pg_restore -h HOST -p PORT -d DB_NAME -U USER_NAME latest_database_backup.dump
-
Build the application
go build backend ./cmd/
-
Run
./backend