Browse Source

rename launcher.sh -> launcher

tags/v1.5.4
Jonathan Cobb 4 years ago
parent
commit
31d63239b2
3 changed files with 30 additions and 15 deletions
  1. +1
    -1
      Dockerfile
  2. +1
    -1
      docs/docker-launcher.md
  3. +28
    -13
      launcher

+ 1
- 1
Dockerfile View File

@@ -5,7 +5,7 @@
# #
# For Linux and Mac OS, you can try the easier way, using a prebuilt image from DockerHub: # For Linux and Mac OS, you can try the easier way, using a prebuilt image from DockerHub:
# #
# /bin/bash -c "$(curl -sL https://git.bubblev.org/bubblev/bubble/raw/branch/master/docker/launcher.sh)"
# /bin/bash -c "$(curl -sL https://git.bubblev.org/bubblev/bubble/raw/branch/master/docker/launcher)"
# #
# See docs/docker-launcher.md for more information # See docs/docker-launcher.md for more information
# Full URL for more info: https://git.bubblev.org/bubblev/bubble/src/branch/master/docs/docker-launcher.md # Full URL for more info: https://git.bubblev.org/bubblev/bubble/src/branch/master/docs/docker-launcher.md


+ 1
- 1
docs/docker-launcher.md View File

@@ -6,7 +6,7 @@ The Bubble Docker Launcher makes it easy to run a Bubble launcher.
If you're running Linux or Mac OS X, try the automatic setup script first. If you're running Linux or Mac OS X, try the automatic setup script first.
This script will automatically install docker, pull the Bubble docker image and run it. This script will automatically install docker, pull the Bubble docker image and run it.


/bin/bash -c "$(curl -sL https://git.bubblev.org/bubblev/bubble/raw/branch/master/launcher.sh)"
/bin/bash -c "$(curl -sL https://git.bubblev.org/bubblev/bubble/raw/branch/master/launcher)"


## Docker Installation ## Docker Installation
If you're running Windows, or if the above script has problems installing Docker, If you're running Windows, or if the above script has problems installing Docker,


launcher.sh → launcher View File

@@ -6,7 +6,7 @@
# #
# Intended to be "run from anywhere" like this: # Intended to be "run from anywhere" like this:
# #
# /bin/bash -c "$(curl -sL https://git.bubblev.org/bubblev/bubble/raw/branch/master/launcher.sh)"
# /bin/bash -c "$(curl -sL https://git.bubblev.org/bubblev/bubble/raw/branch/master/launcher)"
# #
# This command will: # This command will:
# - install docker if no "docker" command found # - install docker if no "docker" command found
@@ -18,8 +18,14 @@
# If you want to run this unattended, set the LETSENCRYPT_EMAIL environment variable. # 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 # Upon successful startup, the bubble launcher will be listening on port 8090
# If you'd prefer to use a different port, set the BUBBLE_PORT environment variable.
# #
# Open http://127.0.0.1:8090/ in a web browser to continue with activation.
# Open http://127.0.0.1:8090/ (or http://127.0.0.1:BUBBLE_PORT/) in a web browser
# to continue with activation.
#
# By default this will grab the latest Bubble release. If you want a specific version,
# set the BUBBLE_TAG environment variable to the release tag you'd like to run,
# usually a semantic version number. For example: BUBBLE_TAG=1.5.2
# #


function die() { function die() {
@@ -31,10 +37,14 @@ function die() {
} }


function get_bubble_tag() { function get_bubble_tag() {
BUBBLE_RELEASE_URL="https://jenkins.bubblev.org/public/releases/bubble/latest.txt"
VERSION="$(curl -s ${BUBBLE_RELEASE_URL} | awk -F '_' '{print $2}' | awk -F '.' '{print $1"."$2"."$3}')"
if [[ -z "${VERSION}" ]]; then
die "Error determining version from URL: ${BUBBLE_RELEASE_URL}"
if [[ -n "${BUBBLE_TAG}" ]] ; then
VERSION="${BUBBLE_TAG}"
else
BUBBLE_RELEASE_URL="https://jenkins.bubblev.org/public/releases/bubble/latest.txt"
VERSION="$(curl -s ${BUBBLE_RELEASE_URL} | awk -F '_' '{print $2}' | awk -F '.' '{print $1"."$2"."$3}')"
if [[ -z "${VERSION}" ]]; then
die "Error determining version from URL: ${BUBBLE_RELEASE_URL}"
fi
fi fi
echo -n "getbubble/launcher:${VERSION}" echo -n "getbubble/launcher:${VERSION}"
} }
@@ -162,16 +172,16 @@ Then re-run this script
fi fi


# Determine bubble docker tag # Determine bubble docker tag
BUBBLE_TAG=$(get_bubble_tag)
DOCKER_TAG=$(get_bubble_tag)


# Determine OS user # Determine OS user
CALLER="$(whoami)" CALLER="$(whoami)"


# Pull bubble docker image # Pull bubble docker image
if [[ "${CALLER}" == "root" ]] ; then if [[ "${CALLER}" == "root" ]] ; then
docker pull "${BUBBLE_TAG}" || die "Error pulling docker image: ${BUBBLE_TAG}"
docker pull "${DOCKER_TAG}" || die "Error pulling docker image: ${DOCKER_TAG}"
else else
sudo su - "${CALLER}" -c "docker pull ${BUBBLE_TAG}" || die "Error pulling docker image: ${BUBBLE_TAG}"
sudo su - "${CALLER}" -c "docker pull ${DOCKER_TAG}" || die "Error pulling docker image: ${DOCKER_TAG}"
fi fi


# Determine email for LetsEncrypt certs # Determine email for LetsEncrypt certs
@@ -181,17 +191,22 @@ Then re-run this script
read -r LETSENCRYPT_EMAIL read -r LETSENCRYPT_EMAIL
fi fi


# Determine port
if [[ -z "${BUBBLE_PORT}" ]] ; then
BUBBLE_PORT=8090
fi

# Run bubble docker image # Run bubble docker image
if [[ "${CALLER}" == "root" ]] ; then if [[ "${CALLER}" == "root" ]] ; then
docker run \ docker run \
-p 8090:8090 \
-p ${BUBBLE_PORT}:${BUBBLE_PORT} \
-e LETSENCRYPT_EMAIL="${LETSENCRYPT_EMAIL}" \ -e LETSENCRYPT_EMAIL="${LETSENCRYPT_EMAIL}" \
-t "${BUBBLE_TAG}"
-t "${DOCKER_TAG}"
else else
sudo su - "${CALLER}" -c "docker run \ sudo su - "${CALLER}" -c "docker run \
-p 8090:8090 \
-p ${BUBBLE_PORT}:${BUBBLE_PORT} \
-e LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL} \ -e LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL} \
-t ${BUBBLE_TAG}"
-t ${DOCKER_TAG}"
fi fi
} }



Loading…
Cancel
Save