Closed campbellssource closed 3 years ago
topgun-sevice is run with:
docker run -d \
--name=topgun-service-testnet-competition-001 \
-p 30001:8000 \
-v /path/to/some/includelist.csv:/includelist.csv \
docker.pkg.github.com/vegaprotocol/topgun-service/topgun-service:latest \
-assetpoll 60s \
-endpoint https://lb.testnet.vega.xyz/query \
-includelist=/includelist.csv \
-vegapoll 60s \
-base BTC \
-quote USD \
-vegaasset tDAI \
-addr=0.0.0.0:8000 \
-algorithm-to-use-when-sorting=some_algorithm_name
In this way, any number of leaderboards can be run.
Then it's up to Caddy to route:
Since the leaderboards do not interfere/interact with each other, each one can be (re)started / stopped independently.
Note: Caddy2 is not so good with reverse proxying and path rewriting at the same time, hence the clunky per-competition DNS hostnames.
It's possible to have multiple leaderboards using multiple docker containers, each with its own config file. Caddy2 then reverse-proxies requests to the right container, depending on URL.
At the moment each instance of
topgun-service
has one leaderboard.Somehow we need to be able to have different leaderboards running at the same time e.g.
https://topgun-service-stagnet.ops.vega.xyz/leaderboard
a general leaderboardhttps://topgun-service-stagnet.ops.vega.xyz/competition-1
spec: https://github.com/vegaprotocol/topgun-service/issues/5https://topgun-service-stagnet.ops.vega.xyz/competition-2
some other competition