Skip to content

Sprocket is a platform to manage and automate organized Esports leagues

License

Notifications You must be signed in to change notification settings

SprocketBot/sprocket

Repository files navigation

Sprocket Project Repo

Discord Server Support us on Ko-Fi Twitter LinkedIn


Sprocket is a platform primarily used to manage and automate organized Esports leagues, one such example being Minor League Esports. The platform uses a Microservice pattern, and this repository contains everything needed to quickly start a new microservice.

Building / Running this Repository

Installing Dependencies:

# In the root directory
npm i

Building Projects

# In the root directory
npm run build --workspaces --if-present

Running Projects

# In the project directory
npm run dev
# For the replay parse service
./start.sh

Building Docker images

Build the base image

docker build . -f dockerfiles/node.Dockerfile -t sprocket-base-image --build-arg COMMIT_SHA=$(git log -1 --format=%H)

docker image ls | grep sprocket
# ->
#    sprocket-base-image                                   latest             cfb627899675   5 seconds ago   1.01GB

Build microservice image

For example, building clients/web:

docker build . -f clients/web/Dockerfile -t sprocket-web --build-arg BASE_IMAGE=sprocket-base-image

docker image ls | grep sprocket
# ->
#    sprocket-web                                          latest             6661a25ebce4   5 seconds ago    1.01GB
#    sprocket-base-image                                   latest             cfb627899675   30 seconds ago   1.01GB

Inspecting COMMIT_SHA of Image / Container

docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' <image/container name or id> | grep COMMIT_SHA