-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathentrypoint.sh
38 lines (31 loc) · 1.7 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# Replaces envs if defined
if [ -n "$START_NAME_STOP" ]; then
echo "Name defined: ${START_NAME_STOP}, replacing in config"
find /usr/share/nginx/html/ -type f -exec sed -i 's|START_NAME_STOP|'${START_NAME_STOP}'|g' {} +
fi
if [ -n "$START_CHAIN_ID_STOP" ]; then
echo "Chain ID defined: ${START_CHAIN_ID_STOP}, replacing in config"
find /usr/share/nginx/html/ -type f -exec sed -i 's|START_CHAIN_ID_STOP|'${START_CHAIN_ID_STOP}'|g' {} +
fi
if [ -n "$START_EGLD_LABEL_STOP" ]; then
echo "egldLabel defined: ${START_EGLD_LABEL_STOP}, replacing in config"
find /usr/share/nginx/html/ -type f -exec sed -i 's|START_EGLD_LABEL_STOP|'${START_EGLD_LABEL_STOP}'|g' {} +
fi
if [ -n "$START_WALLET_ADDRESS_STOP" ]; then
echo "WalletAdress defined: ${START_WALLET_ADDRESS_STOP}, replacing in config"
find /usr/share/nginx/html/ -type f -exec sed -i 's|START_WALLET_ADDRESS_STOP|'${START_WALLET_ADDRESS_STOP}'|g' {} +
fi
if [ -n "$START_EXPLORER_ADDRESS_STOP" ]; then
echo "Explorer address defined: ${START_EXPLORER_ADDRESS_STOP}, replacing in config"
find /usr/share/nginx/html/ -type f -exec sed -i 's|START_EXPLORER_ADDRESS_STOP|'${START_EXPLORER_ADDRESS_STOP}'|g' {} +
fi
if [ -n "$START_NFT_EXPLORER_ADDRESS_STOP" ]; then
echo "NFT Explorer address defined: ${START_NFT_EXPLORER_ADDRESS_STOP}, replacing in config"
find /usr/share/nginx/html/ -type f -exec sed -i 's|START_NFT_EXPLORER_ADDRESS_STOP|'${START_NFT_EXPLORER_ADDRESS_STOP}'|g' {} +
fi
if [ -n "$START_API_ADDRESS_STOP" ]; then
echo "API address defined: ${START_API_ADDRESS_STOP}, replacing in config"
find /usr/share/nginx/html/ -type f -exec sed -i 's|START_API_ADDRESS_STOP|'${START_API_ADDRESS_STOP}'|g' {} +
fi
exec nginx -g 'daemon off;'