Files
explore/deploy/scripts/entrypoint.sh
T
tom goriunovandGitHub 8f16d530c8 OP Superchain Explorer: MVP (#2786)
* context for storing subchain config and tx view for subchain

* address page and block page for subchain

* address aggregated page: local txs tab

* connect MultichainSelect to context

* home page placeholder

* refactor subchain select state

* envs for demo

* fix ts

* clear value for l2 review

* subchain widgets on home page

* csp policies

* sockets, duck and goose

* fix socket on subchain address page

* link builder for subchain views

* update home widget

* fix time increment

* enable tx interpretator and metadata service

* generate multichain config based on every chain app config

* Fix the multichain config to work in Docker

* multichain socket test

* rename subchain-id to subchain-slug path param

* refactoring

* update chain icons on entities

* home page: latest local txs

* latest cross-chain txs

* minor improvements

* renaming, pt. 1

* rename chain routes

* enable blockchain interaction

* add loading state to icon shield

* fix build

* fix tests

* update types package
2025-07-03 15:07:00 +02:00

78 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
export_envs_from_preset() {
if [ -z "$ENVS_PRESET" ]; then
return
fi
if [ "$ENVS_PRESET" = "none" ]; then
return
fi
local preset_file="./configs/envs/.env.$ENVS_PRESET"
if [ ! -f "$preset_file" ]; then
return
fi
local blacklist=(
"NEXT_PUBLIC_APP_PROTOCOL"
"NEXT_PUBLIC_APP_HOST"
"NEXT_PUBLIC_APP_PORT"
"NEXT_PUBLIC_APP_ENV"
"NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL"
)
while IFS='=' read -r name value; do
name="${name#"${name%%[![:space:]]*}"}" # Trim leading whitespace
if [[ -n $name && $name == "NEXT_PUBLIC_"* && ! "${blacklist[*]}" =~ "$name" ]]; then
export "$name"="$value"
fi
done < <(grep "^[^#;]" "$preset_file")
}
# If there is a preset, load the environment variables from the its file
export_envs_from_preset
# Download external assets
./download_assets.sh ./public/assets/configs
# Check run-time ENVs values
if [ "$SKIP_ENVS_VALIDATION" != "true" ]; then
./validate_envs.sh
if [ $? -ne 0 ]; then
exit 1
fi
else
echo "😱 Skipping ENVs validation."
echo
fi
# Generate favicons bundle
./favicon_generator.sh
if [ $? -ne 0 ]; then
echo "👎 Unable to generate favicons bundle."
else
echo "👍 Favicons bundle successfully generated."
fi
echo
# Generate OG image
node --no-warnings ./og_image_generator.js
# Create envs.js file with run-time environment variables for the client app
./make_envs_script.sh
# Generate multichain config
node ./deploy/tools/multichain-config-generator/dist/index.js
# Generate sitemap.xml and robots.txt files
./sitemap_generator.sh
# Print list of enabled features
node ./feature-reporter.js
echo "Starting Next.js application"
exec "$@"