-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
cuonghx
committed
Nov 13, 2024
1 parent
d9fee5f
commit eb9cf3b
Showing
8 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
.DS_Store | ||
.idea/ | ||
data/ | ||
container_env_files/ | ||
!container_env_files_templates/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
REVERSE_PROXY_PORT=8000 | ||
|
||
CFG_VERSION=staging | ||
CGW_VERSION=staging | ||
TXS_VERSION=staging | ||
UI_VERSION=dev | ||
EVENTS_VERSION=staging | ||
|
||
RPC_NODE_URL={RPC_NODE_URL} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
container_env_files/ui.env → container_env_files_templates/ui.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Create the directory if it does not exist | ||
mkdir -p container_env_files | ||
|
||
# Check for required environment variables | ||
if [ -z "${CONFIG_DOMAIN}" ] | ||
then | ||
echo CONFIG_DOMAIN env is missing | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${RPC_NODE_URL}" ] | ||
then | ||
echo RPC_NODE_URL env is missing | ||
exit 1 | ||
fi | ||
|
||
# Generate the environment files using `sed` | ||
sed "s|{RPC_NODE_URL}|$RPC_NODE_URL|g;" $1 ./container_env_files_templates/.env > .env | ||
|
||
sed "s|{CONFIG_DOMAIN}|$CONFIG_DOMAIN|g;" $1 ./container_env_files_templates/cfg.env > ./container_env_files/cfg.env | ||
|
||
cp ./container_env_files_templates/cgw.env ./container_env_files/cgw.env | ||
|
||
cp ./container_env_files_templates/events.env ./container_env_files/events.env | ||
|
||
sed "s|{CONFIG_DOMAIN}|$CONFIG_DOMAIN|g;" $1 ./container_env_files_templates/txs.env > ./container_env_files/txs.env | ||
|
||
sed "s|{CONFIG_DOMAIN}|$CONFIG_DOMAIN|g;" $1 ./container_env_files_templates/ui.env > ./container_env_files/ui.env | ||
|
||
|
||
|