https://github.com/pcsg/pcsg-steem-blockchain-parser
This application parses the Steem Blockchain into a SQL Database.
https://github.com/pcsg/pcsg-steem-blockchain-parser
blockchain database docker parse steem-blockchain steemit-php-parser
Last synced: 3 months ago
JSON representation
This application parses the Steem Blockchain into a SQL Database.
- Host: GitHub
- URL: https://github.com/pcsg/pcsg-steem-blockchain-parser
- Owner: pcsg
- License: gpl-3.0
- Created: 2018-04-05T14:42:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-24T06:13:58.000Z (over 7 years ago)
- Last Synced: 2024-05-01T09:35:56.013Z (about 2 years ago)
- Topics: blockchain, database, docker, parse, steem-blockchain, steemit-php-parser
- Language: PHP
- Homepage:
- Size: 205 KB
- Stars: 9
- Watchers: 7
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
STEEM to Database
======

Description
------
STEEM to Database will parse the STEEM Blockchain and insert the data into a Database.
It is possible to parse either a single block, a range of blocks or run a continuous loop to parse all available blocks.
*Currently only MySQL is supported*
Features
------
* [x] Parse a single block
* [x] Parse a range of Blocks
* [ ] Verify the Database (Check all blocks and insert missing data)
* [x] Parse latest blocks
* [ ] Highly configurable
* [x] Easily readable output
Installation
------
### Needles
```
php-mbstring
php-mysql
```
### Manually
**Step 1** Clone the repository
```
git clone git@dev.quiqqer.com:pcsg/steem-blockchain-parser.git
```
**Step 2** Edit the config file
```
mv etc/config.ini.php.dist etc/config.ini.php
nano etc/config.ini.php
```
**Step 3** Create Database
* Create the Database
* Import the SQL File `sql/createTables.sql`
**Step 4** Run composer
```
composer install
```
**Step 5** Run the parser
```
php run.php
```
### Docker
**Step 1** Database
Create a database on a database server (your docker containers must be able to connect to it)
Execute the `sql/createTables.sql` SQL-Queries to create the databases table structure
**Step 2** Docker container
We provide a docker container for ease of use.
Change the environment variables and run the following command to get the container up and running.
```
docker run --name steemit-parser \
-e DB_HOST= \
-e DB_PORT= \
-e DB_USER= \
-e DB_PASSWORD= \
-e DB_NAME= \
--restart=unless-stopped \
bogner/steem-blockchain-parser
```
**Hint**: To run the container in the background you need to add the `-d` flag to the `docker run` command.
Additional steps
------
### Keep the parser running (For manual installations)
#### Supervisor
```
apt-get install supervisor
```
```
nano /etc/supervisor/conf.d/steem-blockchain-parser.conf
mkdir /logs/
```
```
[program:blockchain-parser]
command=/usr/bin/php run.php
process_name = %(program_name)s-80%(process_num)02d
stdout_logfile = /logs/blockchain-parser%(process_num)02d.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=10
stderr_logfile= /home/s2db/logs/error-blockchain-parser%(process_num)02d.log
numprocs=1
directory=
stopwaitsecs=10
user=
autostart=true
autorestart=true
```
```
service supervisor restart
```
How it works
-----
