Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaptoss committed Apr 3, 2024
0 parents commit 54704c7
Show file tree
Hide file tree
Showing 26 changed files with 6,143 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM golang:1.20-alpine as buildbase

RUN apk add git build-base

WORKDIR /go/src/github.com/rarimo/registration-relayer
COPY vendor .
COPY . .

RUN GOOS=linux go build -o /usr/local/bin/registration-relayer /go/src/github.com/rarimo/registration-relayer


FROM alpine:3.9

COPY --from=buildbase /usr/local/bin/registration-relayer /usr/local/bin/registration-relayer
RUN apk add --no-cache ca-certificates

ENTRYPOINT ["registration-relayer"]
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# registration-relayer

## Description

[//]: # (TODO: add description)

## Install

```
git clone github.com/rarimo/registration-relayer
cd registration-relayer
go build main.go
export KV_VIPER_FILE=./config.yaml
./main run service
```

## Documentation

We do use openapi:json standard for API. We use swagger for documenting our API.

To open online documentation, go to [swagger editor](http://localhost:8080/swagger-editor/) here is how you can start it
```
cd docs
npm install
npm start
```
To build documentation use `npm run build` command,
that will create open-api documentation in `web_deploy` folder.

To generate resources for Go models run `./generate.sh` script in root folder.
use `./generate.sh --help` to see all available options.

Note: if you are using Gitlab for building project `docs/spec/paths` folder must not be
empty, otherwise only `Build and Publish` job will be passed.

## Running from docker

Make sure that docker installed.

use `docker run ` with `-p 8080:80` to expose port 80 to 8080

```
docker build -t github.com/rarimo/registration-relayer .
docker run -e KV_VIPER_FILE=/config.yaml github.com/rarimo/registration-relayer
```

## Running from Source

* Set up environment value with config file path `KV_VIPER_FILE=./config.yaml`
* Provide valid config file
* Launch the service with `run service` command



### Third-party services


## Contact

Responsible
The primary contact for this project is [//]: # (TODO: place link to your telegram and email)
13 changes: 13 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
log:
level: debug
disable_sentry: true

listener:
addr: :8000

cop:
disabled: true
endpoint: "http://..."
upstream: "http://..."
service_name: registration-relayer
service_port: 80
9 changes: 9 additions & 0 deletions docs/.redoclyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

apiTitle: registration-relayer
splitSpec: true
codeSamples: false
swaggerUI: true
travis: true
repo: tokend/notifications/notifications-router-svc
oasVersion: 1.0.0

21 changes: 21 additions & 0 deletions docs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Distributed Lab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 54704c7

Please sign in to comment.