polkascan / explorer

Polkascan Substrate Explorer
GNU General Public License v3.0
42 stars 44 forks source link

Setup the own server DB. #18

Closed SWS-5007 closed 1 year ago

SWS-5007 commented 1 year ago

Hi, I am going to setup the explorer in my local. But I am going to use the DB of the Server. Here is Server Database Infos.

Server Url: https://81.181.255.414
DB Name: test_explorer
DB PORT=3306

How should I setup the DB_CONNECTION to connect to server DB? Current DB_CONNECTION environment is like this: DB_CONNECTION=mysql+pymysql://root:root@mysql:3306/polkascan?charset=utf8mb4 How should I change this?

Please help me!

arjanz commented 1 year ago

With the info that you provided, that would be:

DB_CONNECTION=mysql+pymysql://username:password@81.181.255.414:3306/test_explorer?charset=utf8mb4

Mind you that this is just for the harvester service in the Docker compose file. You will have to make the same changes in the API_SQLA_URI env variable in the api service.

Also you will need two databases, one for the raw harvester data and one for the explorer application where the ETL processes will put the specific explorer data (in the default Docker compose set to polkascan_explorer.)