Browse Source

defaults for support and app links, get letsencrypt email from user

tags/v1.4.15
Jonathan Cobb 4 years ago
parent
commit
44a3804f9c
4 changed files with 49 additions and 19 deletions
  1. +1
    -1
      bubble-server/src/main/resources/META-INF/bubble/bubble.properties
  2. +16
    -16
      bubble-server/src/main/resources/bubble-config.yml
  3. +18
    -1
      docker/bubble.sh
  4. +14
    -1
      docker/launcher.sh

+ 1
- 1
bubble-server/src/main/resources/META-INF/bubble/bubble.properties View File

@@ -1 +1 @@
bubble.version=Adventure 1.4.13
bubble.version=Adventure 1.4.14

+ 16
- 16
bubble-server/src/main/resources/bubble-config.yml View File

@@ -74,7 +74,7 @@ errorApi:

localNotificationStrategy: {{#exists BUBBLE_LOCAL_NOTIFY}}{{BUBBLE_LOCAL_NOTIFY}}{{else}}inline{{/exists}}

letsencryptEmail: {{LETSENCRYPT_EMAIL}}
letsencryptEmail: {{#required LETSENCRYPT_EMAIL}}
localStorageDir: {{LOCALSTORAGE_BASE_DIR}}
releaseUrlBase: {{#exists BUBBLE_RELEASE_URL_BASE}}{{BUBBLE_RELEASE_URL_BASE}}{{else}}https://jenkins.bubblev.org/public/releases{{/exists}}

@@ -91,25 +91,25 @@ rateLimits:
- { limit: 100000, interval: 6h, block: 96h }

support:
email: {{SUPPORT_EMAIL}}
site: {{SUPPORT_SITE}}
email: {{#exists SUPPORT_EMAIL}}{{{SUPPORT_EMAIL}}}{{else}}support@getbubblenow.com{{/exists}}
site: {{#exists SUPPORT_SITE}}{{{SUPPORT_SITE}}}{{else}}https://support.getbubblenow.com/{{/exists}}
locale:
en_US:
email: {{SUPPORT_EMAIL}}
site: {{SUPPORT_SITE}}
email: {{#exists SUPPORT_EMAIL}}{{{SUPPORT_EMAIL}}}{{else}}support@getbubblenow.com{{/exists}}
site: {{#exists SUPPORT_SITE}}{{{SUPPORT_SITE}}}{{else}}https://support.getbubblenow.com/{{/exists}}

appLinks:
ios: {{APP_LINK_IOS}}
android: {{APP_LINK_ANDROID}}
windows: {{APP_LINK_WINDOWS}}
macosx: {{APP_LINK_MACOSX}}
linux: {{APP_LINK_LINUX}}
ios: {{#exists APP_LINK_IOS}}{{{APP_LINK_IOS}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360051573613-Connect-an-Apple-iOS-device-to-your-Bubble{{/exists}}
android: {{#exists APP_LINK_ANDROID}}{{{APP_LINK_ANDROID}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360050800074-Connect-an-Android-device-to-your-Bubble{{/exists}}
windows: {{#exists APP_LINK_WINDOWS}}{{{APP_LINK_WINDOWS}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360051349493-Connect-a-Windows-system-to-your-Bubble{{/exists}}
macosx: {{#exists APP_LINK_MACOSX}}{{{APP_LINK_MACOSX}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360051573753-Connect-an-Apple-Mac-OS-X-system-to-your-Bubble{{/exists}}
linux: {{#exists APP_LINK_LINUX}}{{{APP_LINK_LINUX}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360050799434-Connect-a-Linux-system-to-your-Bubble{{/exists}}
locale:
en_US:
ios: {{APP_LINK_IOS}}
android: {{APP_LINK_ANDROID}}
windows: {{APP_LINK_WINDOWS}}
macosx: {{APP_LINK_MACOSX}}
linux: {{APP_LINK_LINUX}}
ios: {{#exists APP_LINK_IOS}}{{{APP_LINK_IOS}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360051573613-Connect-an-Apple-iOS-device-to-your-Bubble{{/exists}}
android: {{#exists APP_LINK_ANDROID}}{{{APP_LINK_ANDROID}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360050800074-Connect-an-Android-device-to-your-Bubble{{/exists}}
windows: {{#exists APP_LINK_WINDOWS}}{{{APP_LINK_WINDOWS}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360051349493-Connect-a-Windows-system-to-your-Bubble{{/exists}}
macosx: {{#exists APP_LINK_MACOSX}}{{{APP_LINK_MACOSX}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360051573753-Connect-an-Apple-Mac-OS-X-system-to-your-Bubble{{/exists}}
linux: {{#exists APP_LINK_LINUX}}{{{APP_LINK_LINUX}}}{{else}}https://support.getbubblenow.com/hc/en-us/articles/360050799434-Connect-a-Linux-system-to-your-Bubble{{/exists}}

certificateValidationHost: {{CERT_VALIDATION_HOST}}
certificateValidationHost: {{#exists CERT_VALIDATION_HOST}}{{CERT_VALIDATION_HOST}}{{else}}example.com{{/exists}}

+ 18
- 1
docker/bubble.sh View File

@@ -15,6 +15,12 @@
#
# The docker tag used will be getbubble/launcher:version
#
# When using the 'run' mode, you'll be asked for an email address to associate with any LetsEncrypt
# certificates that will be created.
#
# If you want to run this unattended, set the LETSENCRYPT_EMAIL environment variable
# in your ~/.bubble.env file.
#

function die {
echo 1>&2 "${1}"
@@ -33,6 +39,8 @@ if [[ -z "${VERSION}" ]] ; then
fi
BUBBLE_TAG="getbubble/launcher:${VERSION}"

BUBBLE_ENV="${HOME}/.bubble.env"

if [[ "${MODE}" == "build" ]] ; then
if [[ $(find bubble-server/target -type f -name "bubble-server-*.jar" | wc -l | tr -d ' ') -eq 0 ]] ; then
die "No bubble jar found in $(pwd)/bubble-server/target"
@@ -40,7 +48,16 @@ if [[ "${MODE}" == "build" ]] ; then
docker build -t ${BUBBLE_TAG} . || die "Error building docker image"

elif [[ "${MODE}" == "run" ]] ; then
docker run --env-file <(cat "${HOME}/.bubble.env" | sed -e 's/export //' | tr -d '"' | tr -d "'") -p 8090:8090 -t ${BUBBLE_TAG} || die "Error running docker container"
if [[ $(cat "${BUBBLE_ENV}" | grep -v '^#' | grep -c LETSENCRYPT_EMAIL) -eq 0 ]] ; then
if [[ -z "${LETSENCRYPT_EMAIL}" ]] ; then
echo ; echo -n "Email address for LetsEncrypt certificates: "
read -r LETSENCRYPT_EMAIL
fi
echo "
export LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
" >> "${BUBBLE_ENV}"
fi
docker run --env-file <(cat "${BUBBLE_ENV}" | sed -e 's/export //' | tr -d '"' | tr -d "'") -p 8090:8090 -t ${BUBBLE_TAG} || die "Error running docker container"

elif [[ "${MODE}" == "push" ]] ; then
docker push ${BUBBLE_TAG} || die "Error pushing docker image"


+ 14
- 1
docker/launcher.sh View File

@@ -11,6 +11,10 @@
# - pull bubble launcher docker image
# - run bubble launcher docker image
#
# You'll be asked for an email address to associate with any LetsEncrypt certificates that will be created.
#
# If you want to run this unattended, set the LETSENCRYPT_EMAIL environment variable.
#
# Upon successful startup, the bubble launcher will be listening on port 8090
#
# Open http://127.0.0.1:8090/ in a web browser to continue with activation.
@@ -146,8 +150,17 @@ Then re-run this script
# Pull bubble docker image
docker pull ${BUBBLE_TAG} || die "Error pulling docker image: ${BUBBLE_TAG}"

# Determine email for LetsEncrypt certs
if [[ -z "${LETSENCRYPT_EMAIL}" ]] ; then
echo ; echo -n "Email address for LetsEncrypt certificates: "
read -r LETSENCRYPT_EMAIL
fi

# Run bubble docker image
docker run -p 8090:8090 -t ${BUBBLE_TAG}
docker run \
-p 8090:8090 \
-e LETSENCRYPT_EMAIL="${LETSENCRYPT_EMAIL}" \
-t ${BUBBLE_TAG}
}

run_launcher

Loading…
Cancel
Save