-
-
Save shopglobal/2f1b55cc76d8d3cc04bf52b39d629416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## on ubuntu >= 20 only needed : | |
apt install postgresql-12 postgresql-server-dev-12 automake libtool inotify-tools make g++ libgmp-dev cargo zip unzip git curl libncurses5-dev libssl-dev wget tar git apt-transport-https curl build-essential screen | |
mkdir caddy | |
cd caddy && wget https://github.com/caddyserver/caddy/releases/download/v2.5.2/caddy_2.5.2_linux_amd64.tar.gz | |
tar -xvf caddy_2.5.2_linux_amd64.tar.gz | |
echo 'caddy run --adapter "caddyfile" --config "CaddyFile"' > startCaddy.sh | |
mkdir /usr/local/caddy | |
mv ~/caddy/caddy /usr/local/bin/caddy | |
export PATH=$PATH:/usr/local/caddy | |
cd ~ | |
mkdir go | |
cd go | |
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz | |
tar -xvf go1.19.linux-amd64.tar.gz | |
mkdir /usr/local/go | |
mv ~/go/go/* /usr/local/go | |
cd /usr/local/go && ln -s bin/go . && cd ~ | |
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin | |
cd ~ | |
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
nvm install 16 | |
nvm use 16 | |
npm i npm -g | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf | |
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc | |
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc | |
source ~/.bashrc | |
git clone https://github.com/blockscout/blockscout ~/blockscout | |
cd ~/blockscout | |
asdf plugin-add elixir | |
asdf plugin-add erlang | |
asdf install erlang 25.0 | |
asdf install elixir 1.14.5-otp-25 | |
asdf global erlang 25.0 | |
asdf global elixir 1.14.5-otp-25 | |
cd ~/chainScan && screen -S explorer | |
asdf local erlang 25.0 | |
asdf local elixir 1.14.5-otp-25 | |
sudo systemctl start postgresql.service | |
sudo -u postgres psql | |
CREATE DATABASE blockscout WITH OWNER = postgres; | |
GRANT ALL PRIVILEGES ON DATABASE blockscout TO postgres; | |
ALTER USER postgres WITH PASSWORD 'msdkeuii3hInt2asd23ajb09'; | |
or | |
/password | |
then enter password | |
then ## postgres 10 || 12 | |
sudo vim /etc/postgresql/12/main/pg_hba.conf | |
Then change this line: | |
Database administrative login by Unix domain socket | |
## local all postgres md5 | |
to: | |
Database administrative login by Unix domain socket | |
## local all postgres peer | |
Then restart the PostgreSQL service via the 'sudo' command. Then | |
## psql -U postgres | |
You will be now entered and will see the PostgreSQL terminal. | |
Then enter | |
## \password | |
And enter the new password for the PostgreSQL default user. | |
After successfully changing the password again, go to the pg_hba.conf and revert the change to "md5". | |
increase max connections on postgresql.conf | |
export MIX_ENV=prod | |
export COIN="COIN_NAME" | |
export DISABLE_INDEXER=false | |
export SUBNETWORK="CHAIN_NAME" | |
export NETWORK="CHAIN_NAME" | |
export LINK_TO_OTHER_EXPLORERS=false | |
export LOGO="/images/logo.svg" | |
export LOGO_FOOTER="/images/logo.svg" | |
export CHAINID=696969 | |
export CHAIN_ID=696969 | |
export chainId=696969 | |
export ETHEREUM_JSONRPC_TRANSPORT=http | |
export IPC_PATH=/geth12345.ipc | |
export ENABLE_POS_STAKING_IN_MENU=false | |
export ETHEREUM_JSONRPC_HTTP_URL=http://127.0.0.1:8543 | |
export BLOCK_TRANSFORMER=clique | |
export DATABASE_URL=postgresql://postgres:msdkeuii3hInt2asd23ajb09@127.0.0.1:5432/blockscout | |
export DISABLE_EXCHANGE_RATES=true | |
export ETHEREUM_JSONRPC_WS_URL=ws://localhost:8454 | |
export ETHEREUM_JSONRPC_VARIANT=geth | |
export DISABLE_BRIDGE_MARKET_CAP_UPDATER=true | |
export ENABLE_SOURCIFY_INTEGRATION=true | |
export DIAGNOSTIC=false | |
export LINK_TO_OTHER_EXPLORERS=false | |
export DISABLE_EXCHANGE_RATES=true | |
export SUPPORTED_CHAINS=[] | |
export OTHER_EXPLORERS=false | |
export SHOW_PRICE_CHART=false | |
export APPS_MENU=disable | |
export DISABLE_INDEXER=false | |
export ETHEREUM_JSONRPC_TRACE_URL=http://127.0.0.1:8543 | |
export SHOW_PRICE_CHART=false | |
export SECRET_KEY_BASE='ewuxEFlBaUBmEKJSEVbXQ0VqY9bNDPR6e0HC6xdEhbXYBpfXFvIKkGw7JekDJsNW' | |
export NVM_BIN=/root/.nvm/versions/node/v16.15.0/bin | |
mix do deps.get, local.rebar --force, deps.compile | |
mix phx.gen.secret | |
export SECRET_KEY_BASE='JDxwmDK5hkyiE1NiRX3u8/+pNIETpbgSZBAVNreoQVtNAS1vlDjXnWUzk4uogD+5' | |
mix compile | |
mix do ecto.create, ecto.migrate | |
export PORT=4000 | |
cd apps/block_scout_web/assets; npm install && node_modules/webpack/bin/webpack.js --mode production; cd - | |
cd apps/explorer && npm install; cd - | |
mix phx.digest | |
cd apps/block_scout_web; mix phx.gen.cert blockscout blockscout.local; cd - | |
# here we need to edit the hosts file | |
vim /etc/hosts | |
# 127.0.0.1 localhost blockscout blockscout.local | |
# | |
# 255.255.255.255 broadcasthost | |
# | |
# ::1 localhost blockscout blockscout.local | |
MIX_ENV=prod mix phx.server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment