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:
- configuredBridges.json
- configuredChains.json
- configuredRelayer.json
- Additional Configs
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
Prerequisites
- L1 Chain ID
- L1 to L2 Relayer URL
- L2 Chain ID
- L2 to L1 Relayer URL
Path: ./config/configuredRelayer.json
These files also need to be configured:
./config/configuredCustomTokens.json
./config/configuredEventIndexer.json
These files may require minimal or no modification depending on your deployment needs.
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
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:
- Bridge UI Accessibility
- Check if the UI is accessible via the configured domain
- Verify SSL certificate is working properly
- Component Connectivity
- Verify connection to L1 and L2 networks
- Check relayer connectivity
- Confirm Blockscout integration
- 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:
{
"chains": [
{
"id": "L1_CHAIN_ID",
"rpc": "L1_RPC_URL"
},
{
"id": "L2_CHAIN_ID",
"rpc": "L2_RPC_URL"
}
]
}
{
"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:
- UI Access Issues
- Check nginx configuration
- Verify SSL certificate setup
- Confirm port mappings
- Network Connectivity
- Verify RPC endpoints
- Check relayer connections
- Confirm blockchain network access
- Configuration Problems
- Validate JSON syntax in config files
- Verify contract addresses
- Check chain IDs match your network
Make sure all URLs in the nginx configuration are accessible and properly secured before deployment.