Commit 7bcddf4e authored by TonyFord's avatar TonyFord
Browse files

add manual control

parent e3027498
......@@ -30,3 +30,20 @@ Go Gitlab **Settings** -> **CI/CD** -> **Variables**
FAIRCOIN_CONF # faircoin.conf file
FAIRCOIN_PORT # faircoind -port
~~~
## Development <small>( manual usage )</small>
If you want create an instance manual then follow the instructions.
1. clone this project
2. change configuration in ./env
3. run services by ./control.sh
~~~
chmod +x ./control.sh
./control.sh build
./control.sh start
./control.sh stop
./control.sh uninstall
./control.sh remove
~~~
#!/bin/bash
export RUNNER_UID=`id -u`
export RUNNER_GID=`id -g`
export `cat ./env/*`
case $1 in
"build")
mkdir -p ~/.faircoin2
chmod +x ./script/blocknotify.sh
docker-compose stop
docker-compose down
docker-compose build
;;
"start")
chmod +x ./script/blocknotify.sh
docker-compose stop
docker-compose down
source ${FAIRCOIN_CONF}
if [ ! -f "~/.faircoin2/faircoin.conf" ]; then echo -e "rpcconnect=${rpcconnect}\nrpcport=${rpcport}\nrpcuser=${rpcuser}\nrpcpassword=${rpcpassword}\ntxindex=1" > ~/.faircoin2/faircoin.conf; fi
docker-compose up -d
;;
"stop")
docker-compose stop
;;
"uninstall")
docker-compose stop
docker-compose down
;;
"remove")
docker-compose stop
docker-compose down
# rm -R ~/.faircoin2 #### dont use this command if you have some wallet.dat in your ~/.faircoin2 folder !!! In this case remove the block databases manually.
;;
esac
......@@ -11,7 +11,7 @@ services:
RUNNER_GID: "${RUNNER_GID}"
FAIRCOIN_PORT: ${FAIRCOIN_PORT}
env_file:
- ../faircoind.tmp/FAIRCOIN_CONF
- ${FAIRCOIN_CONF}
container_name: FairCoin.Co-faircoind
restart: always
command: '-disablewallet -port=${FAIRCOIN_PORT} -blocknotify=/home/faircoin/script/blocknotify.sh'
......
FAIRCOIN_CONF=./env_file/FAIRCOIN_CONF
FAIRCOIN_PORT=40404
rpcconnect=0.0.0.0
rpcport=8332
rpcuser=faircoin
rpcpassword=password
txindex=1
Markdown is supported
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