Snapchain / op-chain-deployment

0 stars 0 forks source link

improve `l2-explorer-start` make cmd #12

Open bap2pecs opened 4 days ago

bap2pecs commented 4 days ago

in the Makefile (see https://github.com/Snapchain/op-chain-deployment/pull/11) we have

## Launch the OP chain explorer
l2-explorer-start:
    @$(CURDIR)/scripts/l2-blockscout/l2-blockscout-set-env.sh
    docker compose -f docker/docker-compose-l2-explorer.yml up -d backend-db stats-db
    sleep 5
    docker compose -f docker/docker-compose-l2-explorer.yml up -d backend frontend stats smart-contract-verifier visualizer sig-provider visualizer-proxy proxy

ideally, we shouldn't need to specify all the service names. should just be

## Launch the OP chain explorer
l2-explorer-start:
    @$(CURDIR)/scripts/l2-blockscout/l2-blockscout-set-env.sh
    docker compose -f docker/docker-compose-l2-explorer.yml up -d

we are only doing this b/c there are a few db services needs to be started first

is there a better way to do this? e.g. use depends_on and health check

bap2pecs commented 4 days ago

@bournezjc lmk when you start on this one we can discuss how to test

--- steps

# ssh into the server
cd /home/snapchain/op-chain-deployment

then you can play around with the explorer commands e.g. l2-explorer-start, l2-explorer-stop here https://github.com/Snapchain/op-chain-deployment/blob/main/Makefile#L97

the explorer is at: http://34.171.78.38:3001/