Packages - DaoCasino/Documentation GitHub Wiki

Contents

General information

Packages are stored at /root/package folders. Almost all of them are running in docker-containers.

Preparing for build

First of all you should have all the things installed/configured from this page.

Then you should install all the dependencies for our packages:

lerna bootstrap

When you got it installed you can build all packages from our repository.

To build all of them go to repository's root folder and run:

yarn build

To build specific one go to its folder (packages/package). As well as building all the packages you should run:

yarn build

There are some cheats to it:

Cheat sheet

Here you can get all the neccessary things at our server.

[+] Show logs by package name

showlogs package

[+] Run stopped container

rund package

[+] Restart running container

restartd package

[+] Stop running container

stopd package

Packages

Bankroller Core

This packages are stored at /root/bankroller-core and /root/bankroller-core-monorepo at our stage server. One version is from splitted repostitory. Another one is from monorepo.

To build this containers localy you need just to run this from root folder repository you've cloned and have all the dependencies built and installed.

Monorepo:

sh ./packages/bankroller-core/docker_build_bankroller.sh

Splitted one:

sh docker_build_bankroller.sh

How to deploy bankroller-core to stage server

First of all you should be registered in gitlab and be a DaoCasino team member. Next step is to run deploy script (deploy bankroller) in CI after success build.

After success deploy you can check whether it updated correctly or not at bankrollers.stage.dao.casino. There you should enter the Platform_ID of your bankroller (in our case - DC_CloudPlatform).

Then you'll see the following:

NB Some of bankrollers can be found a little later.

DC Protocol

This package is stored at /root/dc-protocol at our stage server. The version is from only monorepo.

To build this containers localy you need just to run this from packages/dc-protocol folder of monorepo you've cloned and have all the dependencies built and installed.

sh docker_build.sh

If it builds correctly you'll see the following:

You can test its api at https://testrpc.stage.dao.casino.

How to deploy dc protocol to stage server

As well as bankroller core it is deployable from gitlab.

Bankroller client

This package is stored at /root/bankroller-client-react at our stage server. The version is from only monorepo.

To build this containers localy you need just to run this from root folder repository you've cloned and have all the dependencies built and installed.

docker build -f packages/bankroller-client-react/Dockerfile -t bankroller-client-react .

How to deploy bankroller client to stage server

As well as bankroller core it is deployable from gitlab.