This repository contains a completely dockerized app for nod-i called Bitcoin Core.
The docker compose contains three images :
corethat contains the core service of the appbackendthat contains the server that allows access to the APIfrontendthat contains the web server that allows access to the UIapp-datathat will contain all the persistent data of the application
Before launching the app, you need to create the UI docker network using this command : docker network create --driver bridge btc-network-api-ui.
To launch the app, go in the root of this repository and run docker compose up.
To stop it, go in the root of this repository and run docker compose down.
To access the UI, you will need to have the reverse proxy running (in the reverse-proxy git repository), then go to either :
[your nod-i IP address]:8080/btc[your nod-i IP address]/app/btcif you have the home server running
For a complete app launch guide, look in the instructions git repository.
The pipeline is defined in .github/workflows and all the scripts that can be needed are in ./github/scripts.
The pipeline is defined in .github/workflows.
It will run if a push is done with a tag matching the regex:
stable-[0-9]+.[0-9]+.[0-9]+(example:stable-2.05.100)beta-[0-9]+.[0-9]+.[0-9]+(example:beta-8.50.15)alpha-[0-9]+.[0-9]+.[0-9]+(example:alpha-0.25.01)test-[0-9]+.[0-9]+.[0-9]+(example:test-10.0.1)
For your information a tag can be made then pushed with the command lines
git tag -a 'myTag' -m 'message'
git push --follow-tagsThe pipeline deploy_or_pull_request have 3 jobs named:
Setup the environmentCreate the tarballPush on store
The setup the environment will create some environment variable that will be used in the two other jobs.
Furthermore, it will setup the conditions to run the jobs commit on apps and push on store and if the application must run on the testnet.
The job create the tarball will create an artifact containing the installer tarball of the bitcoin application in a zip when downloading it from github.
If the tag match beta-.* or test-*, then bitcoin core will be configured to run on the testnet.
It will also build the images of docker and push them on our private repository.
The job push on store will push the tarball of the application bitcoin of the artifact created in the job create the tarball on our store server in a specific folder depending of the tag.
For example tarballs/stable/btc.tar.gz if the tag match stable-*.
The pipeline will always create a tarball that can be installed on a nodi by putting it on our store server at a different path depending on the tag.
The blockchain will be on the testnet and pruned if the tag matches beta-* or test-*.
For the jobs to run correctly there must be some secrets and variables setup in github. With the organization plan free, the secrets and variables can only be made on the repository.
A variable is an environmental variable available inside github pipelines. Contrary to the secrets it can be viewed and changed only partially if you need only a small part to be changed. Variables needed:
BACK_ENV_PROD-> the content of the backend env fileFRONT_ENV_PROD-> the content of the frontend env file
A secret is an environmental variable saved encrypted in github.
It can only be used inside github pipelines with the decrypted value.
It won't be logged in plain text, github search a matching pattern and replace it by ***, so if you really want to display it you need to alter it.
When you want to change one, the old value won't be displayed.
Secrets needed:
TEST_STORE_SSH_HOST-> hostname of the server that will contain nodi storeTEST_STORE_SSH_KEY-> the private ssh key that have access to the user root without password (ssh-copy-id need to be performed with it)TEST_STORE_SSH_PORT-> the port of the server that will contain nodi storeAPPS_SSH_KEY-> the private ssh key that have access to apps repositoryDOCKER_HUB_URL-> the url of our private docker hubDOCKER_HUB_USERNAME-> the username to access our private docker hubDOCKER_HUB_PASSWORD-> the password to access our private docker hubDOCKER_HUB_AUTH-> the auth to permit docker to access ou private docker hub
- Website: https://nod-i.com
- Twitter: @nodi_off
MIT License - see LICENSE file for details.