Commit 354a7389 authored by TonyFord's avatar TonyFord
Browse files

change faircoin to fairchains

parent aa4ce3a8
......@@ -8,12 +8,18 @@ The service is made for/controlled by gitlab runner.
### by Gitlab-Runner
Go Gitlab **CI/CD** -> **Pipeline** and **Run Pipeline**
1. Fork this project to your group/repositories where you have set up a gitlab-runner
1. change the gitlab-runner tags in .gitlab-ci.yml
1. add env files, go to Gitlab **Settings** -> **CI/CD** -> **Variables**
~~~
#### env files ( examples see env_file/...) ######################
FAIRCHAINS_CONF # fairchains.conf / faircoin.conf
SSL_CONF # configuration to create ssl cert
FAIRCHAINS_ELECTRUMX_JSON # electrumx serve network configuration
FAIRCHAINS_JSON # blockchain parameters
~~~
1. run command, go to Gitlab **CI/CD** -> **Pipeline** and **Run Pipeline**
Enter variable name **CMD**
#### CMD - commands
~~~
build # build container ( changes of Dockerfile )
start # start container ( changes of scripts )
......@@ -25,31 +31,17 @@ remove # remove all data
~~~
#### CI/CD Settings
Go Gitlab **Settings** -> **CI/CD** -> **Variables**
~~~
#### FairCoin.Co group variables ######################
FAIRCHAINS_CONF # conf
~~~
### by SSH access <small>( manually without gitlab-runner )</small>
#### install docker and docker-compose ( https://docs.docker.com/compose/install/ )
#### clone this project
#### change configuration in ./env and ./env_file
#### Initialize env vars
1. install docker and docker-compose ( https://docs.docker.com/compose/install/ )
1. clone this project
1. change configuration in ./env_file
1. Initialize env vars
~~~
chmod +x ./setenv.sh && . setenv.sh
~~~
#### Deployment stages
run command from project root folder
1. run command from project root folder
~~~
deploy/build
deploy/start
......
......@@ -2,13 +2,14 @@
### configuration files will created or overwritten if exists
cat ${FAIRCHAINS_CONF} > scripts/fairchains.conf
cat ${FAIRCHAINS_CONF} | sed -e s/netname/\#\ netname/g > scripts/faircoin.conf
cat ${FAIRCOINCHAIN_JSON} > scripts/FairCoinChain.json
cat ${FAIRCOINCHAIN_ELECTRUMX_JSON} > scripts/FairCoinChain.electrumx.json
export `cat env_file/FAIRCHAINS_CONF`
cat ${FAIRCHAINS_JSON} > scripts/${netname}.json
cat ${FAIRCHAINS_ELECTRUMX_JSON} > scripts/${netname}.electrumx.json
docker-compose stop --timeout 30
docker-compose up -d faircoin
docker-compose exec -T faircoin mv -f scripts/fairchains.conf .faircoin2/
docker-compose exec -T faircoin mv -f scripts/faircoin.conf .faircoin2/
docker-compose exec -T faircoin mv -f scripts/FairCoinChain.json .faircoin2/
docker-compose exec -T faircoin mv -f scripts/FairCoinChain.electrumx.json .faircoin2/
docker-compose exec -T faircoin mv -f scripts/${netname}.json .faircoin2/
docker-compose exec -T faircoin mv -f scripts/${netname}.electrumx.json .faircoin2/
docker-compose exec -T faircoin ./faircoind -disablewallet -daemon
docker-compose up -d electrumfairchainsx
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment