-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.sh
21 lines (19 loc) · 908 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if [[ $OSTYPE == darwin* ]]
then
SED_EXTRA_ARGS='""';
fi
for f in /usr/share/nginx/html/*
do
echo "Substituting Environment variables and other stuff in $f ...";
sed -i $SED_EXTRA_ARGS "s?{{API_URL}}?${API_URL}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{FYLE_APP_URL}}?${FYLE_APP_URL}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{CALLBACK_URI}}?${CALLBACK_URI}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{FYLE_CLIENT_ID}}?${FYLE_CLIENT_ID}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{PRODUCTION}}?${PRODUCTION}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{SENTRY_DSN}}?${SENTRY_DSN}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{SENTRY_ENV}}?${SENTRY_ENV}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{CLARITY_PROJECT_ID}}?${CLARITY_PROJECT_ID}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{SEGMENT_ID}}?${SEGMENT_ID}?g" $f;
sed -i $SED_EXTRA_ARGS "s?{{MIXPANEL_PROJECT_TOKEN}}?${MIXPANEL_PROJECT_TOKEN}?g" $f;
done
nginx -g "daemon off;"