-
Notifications
You must be signed in to change notification settings - Fork 1
/
entrypoint.sh
executable file
·19 lines (16 loc) · 1.48 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
cat > $WWWDIR/settings.js <<EOL
window.MorphicSettings = {
serviceURL: "${SERVICE_URL-http://localhost:5002/}",
recaptchaKey: "${RECAPTCHA_KEY}",
windowsDownloadURL: "${MORPHIC_WINDOWS_DOWNLOAD_URL}",
macDownloadURL: "${MORPHIC_MAC_DOWNLOAD_URL}",
windowsCommunityDownloadURL: "${MORPHIC_WINDOWS_COMMUNITY_DOWNLOAD_URL}",
macCommunityDownloadURL: "${MORPHIC_MAC_COMMUNITY_DOWNLOAD_URL}",
communityRegistrationURL: "${MORPHIC_COMMUNITY_REGISTRATION_URL}",
};
EOL
cat $WWWDIR/settings.js
envsubst '$MORPHIC_WINDOWS_APPCAST_URL:$MORPHIC_WINDOWS_X86_APPCAST_URL:$MORPHIC_WINDOWS_X64_APPCAST_URL:$MORPHIC_WINDOWS_ARM64_APPCAST_URL:$MORPHIC_WINDOWS_ENTERPRISE_X86_APPCAST_URL:$MORPHIC_WINDOWS_ENTERPRISE_X64_APPCAST_URL:$MORPHIC_WINDOWS_ENTERPRISE_ARM64_APPCAST_URL:$MORPHIC_WINDOWS_BETA_APPCAST_URL:$MORPHIC_WINDOWS_COMMUNITY_APPCAST_URL:$MORPHIC_MAC_APPCAST_URL:$MORPHIC_MAC_BETA_APPCAST_URL:$MORPHIC_WINDOWS_DOWNLOAD_URL:$MORPHIC_WINDOWS_X86_DOWNLOAD_URL:$MORPHIC_WINDOWS_X64_DOWNLOAD_URL:$MORPHIC_WINDOWS_ARM64_DOWNLOAD_URL:$MORPHIC_WINDOWS_ENTERPRISE_X86_DOWNLOAD_URL:$MORPHIC_WINDOWS_ENTERPRISE_X64_DOWNLOAD_URL:$MORPHIC_WINDOWS_ENTERPRISE_ARM64_DOWNLOAD_URL:$MORPHIC_WINDOWS_BETA_DOWNLOAD_URL:$MORPHIC_MAC_DOWNLOAD_URL:$MORPHIC_MAC_BETA_DOWNLOAD_URL' < /MorphicLiteWeb/config/nginx.conf > /MorphicLiteWeb/config/nginx.conf.subst
mv /MorphicLiteWeb/config/nginx.conf.subst /MorphicLiteWeb/config/nginx.conf
nginx -p /MorphicLiteWeb -c config/nginx.conf -g "daemon off;"