From 8d9217b767beff7408ef8824a47d9e5655cdddd1 Mon Sep 17 00:00:00 2001 From: jfederico Date: Wed, 12 Feb 2020 15:33:17 -0500 Subject: Added postgress --- docker-compose.yml | 22 ++++++++++++++++++++-- scripts/build.sh | 6 +++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d7e9717..c54f609 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,6 +32,19 @@ services: volumes: - ./data/redis/:/data + postgres: + image: postgres:9.5 + restart: "no" + ports: + - 127.0.0.1:5432:5432 + volumes: + - ./data/postgres/:/var/lib/postgresql/data + environment: + - PGHOST=postgres + - PGDATABASE=postgres + - PGUSER=postgres + - PGPASSWORD=password + scalelite.api: entrypoint: [bin/start] image: blindsidenetwks/scalelite:master @@ -40,8 +53,9 @@ services: - 127.0.0.1:3000:3000 links: - redis + - postgres volumes: -# - ./scalelite/log/api:/srv/scalelite/log + - ./scalelite/log/api:/srv/scalelite/log - ./scalelite/bin/start:/srv/scalelite/bin/start - ./scalelite/tmp/pids/:/usr/src/app/tmp/pids - ./scalelite/tmp/sockets/:/usr/src/app/tmp/sockets @@ -49,6 +63,10 @@ services: env_file: ./scalelite/.env environment: - REDIS_URL=redis://redis:6379 + - DB_HOST=postgres + - DB_NAME=scalelite_production + - DB_USERNAME=postgres + - DB_PASSWORD=password - URL_HOST=${HOST_NAME:-sl}.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org} scalelite.poller: @@ -60,7 +78,7 @@ services: links: - redis volumes: -# - ./scalelite/log/poller:/srv/scalelite/log + - ./scalelite/log/poller:/srv/scalelite/log - ./scalelite/bin/start-poller:/srv/scalelite/bin/start-poller env_file: ./scalelite/.env environment: diff --git a/scripts/build.sh b/scripts/build.sh index f455f17..15ac4c8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -63,8 +63,8 @@ if [ $sqliteCount -lt 2 ]; then fi # Set the version tag when it is a release or the commit sha was included. -if [[ "$CD_REF_NAME" == *"release"* ]]; then - export CD_BUILD_NUMBER=${CD_REF_NAME:8} +if [[ "$CD_REF_NAME" == *"v"* ]]; then + export CD_BUILD_NUMBER=${CD_REF_NAME:1} else export CD_BUILD_NUMBER="$CD_REF_NAME ($(expr substr $(git rev-parse HEAD) 1 7))" fi @@ -87,7 +87,7 @@ echo "#### Docker image $CD_DOCKER_REPO:$CD_REF_NAME is being published" docker push $CD_DOCKER_REPO # Publish image as latest and v2 if it is a release (excluding alpha and beta) -if [[ "$CD_REF_NAME" == *"release"* ]] && [[ "$CD_REF_NAME" != *"alpha"* ]] && [[ "$CD_REF_NAME" != *"beta"* ]]; then +if [[ "$CD_REF_NAME" == *"v"* ]] && [[ "$CD_REF_NAME" != *"alpha"* ]] && [[ "$CD_REF_NAME" != *"beta"* ]]; then docker_image_id=$(docker images | grep -E "^$CD_DOCKER_REPO.*$CD_REF_NAME" | awk -e '{print $3}') docker tag $docker_image_id $CD_DOCKER_REPO:latest docker push $CD_DOCKER_REPO:latest -- cgit v1.2.3