Browse Source

update docs

tags/v1.4.4
Jonathan Cobb 3 years ago
parent
commit
ca8897f912
3 changed files with 26 additions and 19 deletions
  1. +6
    -0
      Dockerfile
  2. +16
    -13
      docker/launcher.sh
  3. +4
    -6
      docker/run_postgresql.sh

+ 6
- 0
Dockerfile View File

@@ -1,6 +1,12 @@
# #
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
# #
# Creates a Docker image that runs the Bubble Launcher. You shouldn't have to use this file directly.
#
# 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)"
#
FROM phusion/baseimage:focal-1.0.0alpha1-amd64 FROM phusion/baseimage:focal-1.0.0alpha1-amd64
MAINTAINER jonathan@getbubblenow.com MAINTAINER jonathan@getbubblenow.com
LABEL maintainer="jonathan@getbubblenow.com" LABEL maintainer="jonathan@getbubblenow.com"


+ 16
- 13
docker/launcher.sh View File

@@ -2,15 +2,14 @@
# #
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
# #
# Run bubble launcher in a docker container. Intended for non-developers to run via curl | bash:
# Run bubble launcher in a docker container. Works on Linux or Mac OS.
# #
# Usage:
#
# launcher.sh
# /bin/bash -c "$(curl -sL https://git.bubblev.org/bubblev/bubble/raw/branch/master/docker/launcher.sh)"
# #
# This command will: # This command will:
# - install docker if not found
# - pull and run bubble docker image
# - install docker if no "docker" command found
# - pull bubble launcher docker image
# - run bubble launcher docker image
# #


function die { function die {
@@ -18,12 +17,14 @@ function die {
exit 1 exit 1
} }


BUBBLE_META_URL="https://git.bubblev.org/bubblev/bubble/raw/branch/master/bubble-server/src/main/resources/META-INF/bubble/bubble.properties"
VERSION="$(curl -s ${BUBBLE_META_URL} | grep bubble.version | awk -F '=' '{print $2}' | awk -F ' ' '{print $NF}' | awk '{$1=$1};1')"
if [[ -z "${VERSION}" ]] ; then
die "Error determining version from URL: ${BUBBLE_META_URL}"
fi
BUBBLE_TAG="getbubble/launcher:${VERSION}"
function get_bubble_tag() {
BUBBLE_META_URL="https://git.bubblev.org/bubblev/bubble/raw/branch/master/bubble-server/src/main/resources/META-INF/bubble/bubble.properties"
VERSION="$(curl -s ${BUBBLE_META_URL} | grep bubble.version | awk -F '=' '{print $2}' | awk -F ' ' '{print $NF}' | awk '{$1=$1};1')"
if [[ -z "${VERSION}" ]] ; then
die "Error determining version from URL: ${BUBBLE_META_URL}"
fi
echo -n "getbubble/launcher:${VERSION}"
}


function setup_docker_linux() { function setup_docker_linux() {
# Ensure apt is up to date # Ensure apt is up to date
@@ -75,12 +76,14 @@ function setup_docker() {
fi fi
fi fi


# Determine bubble docker tag based on meta props bubble version
BUBBLE_TAG=$(get_bubble_tag)

# Pull bubble docker image # Pull bubble docker image
docker pull ${BUBBLE_TAG} docker pull ${BUBBLE_TAG}


# Run bubble docker image # Run bubble docker image
docker run -p 8090:8090 -t ${BUBBLE_TAG} || die "Error running docker container" docker run -p 8090:8090 -t ${BUBBLE_TAG} || die "Error running docker container"

} }


setup_docker setup_docker

+ 4
- 6
docker/run_postgresql.sh View File

@@ -1,15 +1,13 @@
#!/bin/sh #!/bin/sh
# #
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
# adapted from https://stackoverflow.com/q/11092358
# #
# This script is run by Supervisor to start PostgreSQL in foreground mode.
# #
# adapted from https://stackoverflow.com/q/11092358
# This script is run by Supervisor to start PostgreSQL in foreground mode
# WARNING: If you have more than one PostgreSQL version installed, there could be problems.
# This script assumes you have only one version of PostgreSQL installed.
# #
# If you have more than one PostgreSQL version installed, there could be problems.
# This script assumes you have only one version installed

if [ -d /var/run/postgresql ]; then if [ -d /var/run/postgresql ]; then
chmod 2775 /var/run/postgresql chmod 2775 /var/run/postgresql
else else


Loading…
Cancel
Save