Sign inSign up

systemli/ticker

By systemli

•Updated 2 days ago

API and Storage of the Systemli Ticker Project

Image
2

3.4K

systemli/ticker repository overview

⁠ticker Integration Quality codecov Docker Automated build MicroBadger Size

This repository contains the API and storage for the Systemli Ticker Project⁠.

⁠Requirements

The project is written in Go. You should be familiar with the structure and organisation of the code. If not, there are some good guides⁠.

⁠First run

  • make sure you have pulled git submodules
git clone --recurse-submodules [email protected]:systemli/ticker.git

or if you already cloned the repo

cd <path-to-ticker>
git submodule update --init --recursive
  • we provide a Makefile for clean, build, test and release the software
āžœ  ticker git:(master) āœ— make run
go build -o build/ticker -v
cp config.yml.dist build/config.yml
./build/ticker -config build/config.yml
INFO[0000] admin user created (change password now!)     [email protected] password="5O.AVsHDd@Y23<aGWlxpwKiS"
INFO[0000] starting ticker at localhost:8080

Now you have a running ticker API!

⁠Configuration

  • Example config.yml.dist
# listen binds ticker to specific address and port
listen: "localhost:8080"
# log_level sets log level for logrus
log_level: "error"
# initiator is the email for the first admin user (see password in logs)
initiator: "[email protected]"
# database is the path to the bolt file
database: "ticker.db"
# secret used for JSON Web Tokens
secret: "slorp-panfil-becall-dorp-hashab-incus-biter-lyra-pelage-sarraf-drunk"
# twitter configuration
twitter_consumer_key: ""
twitter_consumer_secret: ""
# listen port for prometheus metrics exporter
metrics_listen: ":8181"
# path where to store the uploaded files
upload_path: "/path/to/uploads"
# base url for uploaded assets
upload_url: "http://localhost:8080"

We use viper⁠. That means you can use any of the supported file formats. Env variables will overwrite existing config file values. Note that every env variable MUST be prefixed by: TICKER_. E.g. TICKER_DATABASE.

The following env vars can be used:

  • TICKER_DATABASE
  • TICKER_LISTEN
  • TICKER_LOG_LEVEL
  • TICKER_INITIATOR
  • TICKER_SECRET
  • TICKER_TWITTER_CONSUMER_KEY
  • TICKER_TWITTER_CONSUMER_SECRET
  • TICKER_METRICS_LISTEN
  • TICKER_UPLOAD_PATH
  • TICKER_UPLOAD_URL

⁠Testing

make test

Tag summary

Content type

Image

Digest

sha256:3cf9e2cad…

Size

12.3 MB

Last updated

2 days ago

docker pull systemli/ticker