README.md 2.58 KB
Newer Older
TonyFord's avatar
TonyFord committed
1
2
3
4
5
6
# FairCoin blockchain explorer

The service is made for/controlled by gitlab runner.

## Usage

TonyFord's avatar
TonyFord committed
7
### by Gitlab-Runner
TonyFord's avatar
TonyFord committed
8

TonyFord's avatar
TonyFord committed
9
10
11
12
13
14
15
16
17
18
19
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 ( select Type = file ! ) to override defaults ./env_file , go to Gitlab **Settings** -> **CI/CD** -> **Variables**

You can read a full developer report of server preparation with gitlab-runner usage > [DEV_REPORT.md](DEV_REPORT.md)

~~~
#### env files ( examples see env_file/... / select Type = file !) ######################
CCE_CONF              # config dbload.py
SERVER_CONF           # config websrv.py
FAIRCHAINS_CONF       # conf file to run the faircoind or fairchains daemon
TonyFord's avatar
TonyFord committed
20

TonyFord's avatar
TonyFord committed
21
22
23
24
25
#### env vars ###########################################################################
MYSQL_USER            # mysql user ( used to run the explorer )
MYSQL_PASSWORD        # mysql user password
MYSQL_DATABASE_PORT   # mysql database port ( default 3306 )
MYSQL_ROOT_PASSWORD   # mysql root user password ( used to admin the database )
TonyFord's avatar
TonyFord committed
26

TonyFord's avatar
TonyFord committed
27
28
29
30
LH_PORT_explorer      # port running explorer by localhost ( default 8222 / use nginx proxy to make it available by remote   )  
~~~
1. run command, go to Gitlab **CI/CD** -> **Pipeline** and **Run Pipeline**
Enter variable name **CMD**
TonyFord's avatar
TonyFord committed
31
32
~~~
build        # build container ( changes of Dockerfile )
TonyFord's avatar
TonyFord committed
33
init         # remove blockchain data and initialize sql database and faircoin/fairchains.conf
TonyFord's avatar
TonyFord committed
34
35
start        # start container ( changes of scripts )
stop         # stop container
TonyFord's avatar
TonyFord committed
36
37
38
install      # runs build, init, start stages
uninstall    # remove container without to delete the data
remove       # remove all data
TonyFord's avatar
TonyFord committed
39
40
~~~

TonyFord's avatar
TonyFord committed
41
### by SSH access <small>( manually without gitlab-runner )</small>
TonyFord's avatar
TonyFord committed
42

TonyFord's avatar
TonyFord committed
43
44
45
46
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
TonyFord's avatar
TonyFord committed
47
~~~
TonyFord's avatar
TonyFord committed
48
49
chmod +x setenv
. setenv
TonyFord's avatar
TonyFord committed
50
~~~
TonyFord's avatar
TonyFord committed
51

TonyFord's avatar
TonyFord committed
52
53
54
55
56
57
58
59
60
61
1. run command from project root folder
~~~
deploy/build
deploy/init
deploy/start
deploy/stop
deploy/install
deploy/uninstall
deploy/remove
~~~
TonyFord's avatar
TonyFord committed
62

TonyFord's avatar
TonyFord committed
63
#### Troubleshooting
TonyFord's avatar
TonyFord committed
64

TonyFord's avatar
TonyFord committed
65
some commands can be helpful getting shell access to container or get some status info
TonyFord's avatar
TonyFord committed
66
~~~
TonyFord's avatar
TonyFord committed
67
68
69
70
71
72
console/explorer                    # get access to container of explorer server app
console/db                          # get access to container of mysql database
console/faircoin                    # get access to container of faircoind

console/ps                          # list containers status info
console/status                      # list all ports / processes and faircoind info
TonyFord's avatar
TonyFord committed
73
~~~