Skip to main content

Deploy Bridge UI

This guide walks you through deploying the Surge Bridge UI, including all necessary configurations and services.

1. Clone Repository

First, clone the Surge Taiko Mono repository:

git clone https://github.com/NethermindEth/surge-taiko-mono.git
cd surge-taiko-mono/packages/bridge-ui

2. Configure Components

Configuration Files Setup

You'll need to configure several JSON files before deployment. Each has specific requirements:

Prerequisites

  • L1 Chain ID
  • L1 Contract Addresses:
  • L1_BRIDGE
  • L1_ERC20_VAULT
  • L1_ERC721_VAULT
  • L1_ERC1155_VAULT
  • L1_SIGNAL_SERVICE
  • L2 Chain ID
  • L2 Contract Addresses:
  • L2_BRIDGE
  • L2_ERC20_VAULT
  • L2_ERC721_VAULT
  • L2_ERC1155_VAULT
  • L2_SIGNAL_SERVICE

Path: ./config/configuredBridges.json

3. SSL Certificate Setup

Generate SSL certificates for nginx:

chmod +x ./nginx/generate-certs.sh
./nginx/generate-certs.sh

4. Configure Nginx Reverse Proxy

Prerequisites

  • L1 RPC URL
  • L1 Blockscout URL
  • L1 to L2 Relayer URL
  • L2 RPC URL
  • L2 Blockscout URL
  • L2 to L1 Relayer URL
info

Update the nginx configuration files with your specific URLs and endpoints.

5. Deploy Services

Deploy the Bridge UI and nginx services:

# Start Bridge UI
docker compose --profile bridge-ui up -d --build

# Start Nginx
docker compose --profile nginx up -d

Verification Steps

After deployment, verify:

  1. Bridge UI Accessibility
  • Check if the UI is accessible via the configured domain
  • Verify SSL certificate is working properly
  1. Component Connectivity
  • Verify connection to L1 and L2 networks
  • Check relayer connectivity
  • Confirm Blockscout integration
  1. Service Health
# Check running containers
docker compose ps

# View Bridge UI logs
docker compose logs bridge-ui -f

# View Nginx logs
docker compose logs nginx -f

Configuration Examples

Here are sample structures for the configuration files:

configuredChains.json
{
"chains": [
{
"id": "L1_CHAIN_ID",
"rpc": "L1_RPC_URL"
},
{
"id": "L2_CHAIN_ID",
"rpc": "L2_RPC_URL"
}
]
}
configuredRelayer.json
{
"relayers": [
{
"fromChainId": "L1_CHAIN_ID",
"toChainId": "L2_CHAIN_ID",
"url": "L1_TO_L2_RELAYER_URL"
},
{
"fromChainId": "L2_CHAIN_ID",
"toChainId": "L1_CHAIN_ID",
"url": "L2_TO_L1_RELAYER_URL"
}
]
}

Troubleshooting

If you encounter issues:

  1. UI Access Issues
  • Check nginx configuration
  • Verify SSL certificate setup
  • Confirm port mappings
  1. Network Connectivity
  • Verify RPC endpoints
  • Check relayer connections
  • Confirm blockchain network access
  1. Configuration Problems
  • Validate JSON syntax in config files
  • Verify contract addresses
  • Check chain IDs match your network
warning

Make sure all URLs in the nginx configuration are accessible and properly secured before deployment.