Ver código fonte

comment and cleanup Dockerfile, allow alternate docker repo

tags/v1.4.15
Jonathan Cobb 3 anos atrás
pai
commit
461b5af0f7
2 arquivos alterados com 34 adições e 6 exclusões
  1. +28
    -4
      Dockerfile
  2. +6
    -2
      docker/bubble.sh

+ 28
- 4
Dockerfile Ver arquivo

@@ -14,35 +14,59 @@ MAINTAINER jonathan@getbubblenow.com
LABEL maintainer="jonathan@getbubblenow.com"
LABEL license="https://getbubblenow.com/license"

# Install packages
RUN apt update -y
RUN DEBIAN_FRONTEND=noninteractive apt upgrade -y --no-install-recommends
RUN DEBIAN_FRONTEND=noninteractive apt install openjdk-11-jre-headless postgresql redis-server jq python3 python3-pip curl unzip -y --no-install-recommends
RUN DEBIAN_FRONTEND=noninteractive apt install xtail -y --no-install-recommends
RUN pip3 install setuptools psycopg2-binary

#################
### Redis
#################
# Ensure redis runs in foreground
RUN bash -c "sed -i -e 's/daemonize yes/daemonize no/g' /etc/redis/redis.conf"

RUN bash -c "sed -i -e 's/ md5/ trust/g' $(find /etc/postgresql -mindepth 1 -maxdepth 1 -type d | sort | tail -1)/main/pg_hba.conf"
# Setup redis service
RUN mkdir /etc/service/redis
COPY docker/run_redis.sh /etc/service/redis/run

#################
### PostgreSQL
#################
# trust local postgresql users
#RUN bash -c "sed -i -e 's/ md5/ trust/g' $(find /etc/postgresql -mindepth 1 -maxdepth 1 -type d | sort | tail -1)/main/pg_hba.conf"

# Create "root" postgres user and bubble database
RUN bash -c "service postgresql start && sleep 5s && service postgresql status && \
su - postgres bash -c 'createuser -h 127.0.0.1 -U postgres --createdb --createrole --superuser root' && \
su - postgres bash -c 'createuser -h 127.0.0.1 -U postgres --createdb bubble'"

# Setup PostgreSQL service
RUN mkdir /etc/service/postgresql
COPY docker/run_postgresql.sh /etc/service/postgresql/run

RUN mkdir /etc/service/redis
COPY docker/run_redis.sh /etc/service/redis/run

#################
### Bubble
#################
# Install packer
RUN mkdir /bubble
COPY bin/install_packer.sh /usr/local/bin/
RUN /usr/local/bin/install_packer.sh

# Install API jar and env file
COPY bubble-server/target/bubble-server-*.jar /bubble/bubble.jar
COPY docker/bubble.env /bubble/bubble.env

# Setup Bubble service
RUN mkdir /etc/service/bubble
COPY docker/run_bubble.sh /etc/service/bubble/run

#################
### Main stuff
#################
# Expose bubble port
EXPOSE 8090

# Phusion baseimage runs the services created above
CMD ["/sbin/my_init"]

+ 6
- 2
docker/bubble.sh Ver arquivo

@@ -15,11 +15,14 @@
#
# The docker tag used will be getbubble/launcher:version
#
# If you want to change the "getbubble/launcher" part of the Docker tag, set the BUBBLE_DOCKER_REPO
# environment variable in your shell environment.
#
# 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.
# in your ~/.bubble.env file or in your shell environment.
#

function die {
@@ -37,7 +40,8 @@ VERSION="${2:-$(cat ${META_FILE} | grep bubble.version | awk -F '=' '{print $2}'
if [[ -z "${VERSION}" ]] ; then
die "Error determining version from: ${META_FILE}"
fi
BUBBLE_TAG="getbubble/launcher:${VERSION}"
DOCKER_REPO=${BUBBLE_DOCKER_REPO?getbubble/launcher}
BUBBLE_TAG="${DOCKER_REPO}:${VERSION}"

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



Carregando…
Cancelar
Salvar