-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable SSL for block explorer #24
Conversation
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
# macOS | ||
sed -i '' "s|^L1_SYSTEM_CONFIG_CONTRACT=.*|L1_SYSTEM_CONFIG_CONTRACT=$L1_SYSTEM_CONFIG_ADDRESS|" "$ENV_FILE" | ||
sed -i '' "s|^L1_OUTPUT_ORACLE_CONTRACT=.*|L1_OUTPUT_ORACLE_CONTRACT=$OUTPUT_ORACLE_ADDRESS|" "$ENV_FILE" | ||
else | ||
# Linux and others | ||
sed -i "s|^L1_SYSTEM_CONFIG_CONTRACT=.*|L1_SYSTEM_CONFIG_CONTRACT=$L1_SYSTEM_CONFIG_ADDRESS|" "$ENV_FILE" | ||
sed -i "s|^L1_OUTPUT_ORACLE_CONTRACT=.*|L1_OUTPUT_ORACLE_CONTRACT=$OUTPUT_ORACLE_ADDRESS|" "$ENV_FILE" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can also use the sed -i.bak
which works on both macOS and Linux, but need to remove the generated backup file, like:
sed -i.bak "s|^L1_SYSTEM_CONFIG_CONTRACT=.*|L1_SYSTEM_CONFIG_CONTRACT=$L1_SYSTEM_CONFIG_ADDRESS|" "$ENV_FILE"
rm $ENV_FILE.bak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, updated!
@@ -0,0 +1,18 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a Make command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
This PR updates the Blockscout deployment configs to support SSL.
Details
The Blockscout docker compose uses an nginx reverse proxy to route traffic between internal containers (frontend, backed, stats etc). We add a second nginx instance at the server level to route domain traffic to the internal Docker network.
The frontend also makes calls to its own /api, /socket routes. Since the site is setup for SSL we need to config these to use their secure variants (https, wss) in Blockscout.
Server-level nginx:
Test plan
Visit https://tohma.explorer.snapcha.in/