From 1239246d84a9dae5166b6c2da12cfc6ee4c639e7 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Sun, 24 Jan 2021 14:02:36 +0000 Subject: [PATCH 1/3] easier bootstrap script --- hosting/bootstrap.sh | 17 +++++++++++++++++ hosting/docker-compose.yaml | 5 +++++ 2 files changed, 22 insertions(+) create mode 100755 hosting/bootstrap.sh diff --git a/hosting/bootstrap.sh b/hosting/bootstrap.sh new file mode 100755 index 0000000000..29982dcded --- /dev/null +++ b/hosting/bootstrap.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +GITHUB_BASE_URL=https://raw.githubusercontent.com/Budibase/budibase/master/hosting + +if ! [ -x "$(command -v wget)" ]; then + echo 'Error: wget is not installed. Please install it for your operating system.' >&2 + exit 1 +fi + +fetch_config_files() { + wget $GITHUB_BASE_URL/docker-compose.yaml + wget $GITHUB_BASE_URL/envoy.yaml + wget $GITHUB_BASE_URL/hosting.properties + wget $GITHUB_BASE_URL/start.sh +} + +fetch_config_files \ No newline at end of file diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index 5b7c266c1e..4d338cb221 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -2,6 +2,7 @@ version: "3" services: app-service: + restart: always image: budibase/budibase-apps ports: - "${APP_PORT}:4002" @@ -18,6 +19,7 @@ services: - worker-service worker-service: + restart: always image: budibase/budibase-worker ports: - "${WORKER_PORT}:4003" @@ -36,6 +38,7 @@ services: - couch-init minio-service: + restart: always image: minio/minio volumes: - minio_data:/data @@ -53,6 +56,7 @@ services: retries: 3 proxy-service: + restart: always image: envoyproxy/envoy:v1.16-latest volumes: - ./envoy.yaml:/etc/envoy/envoy.yaml @@ -66,6 +70,7 @@ services: - couchdb-service couchdb-service: + restart: always image: apache/couchdb:3.0 environment: - COUCHDB_PASSWORD=${COUCH_DB_PASSWORD} From e70b9946dd54ac591ee800dcec3df1cfcbf085f4 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 25 Jan 2021 09:49:07 +0000 Subject: [PATCH 2/3] start command in bootstrap script --- hosting/bootstrap.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosting/bootstrap.sh b/hosting/bootstrap.sh index 29982dcded..12482b73e8 100755 --- a/hosting/bootstrap.sh +++ b/hosting/bootstrap.sh @@ -14,4 +14,7 @@ fetch_config_files() { wget $GITHUB_BASE_URL/start.sh } -fetch_config_files \ No newline at end of file +fetch_config_files + +# Start budibase +docker-compose --env-file hosting.properties up \ No newline at end of file From f00ddf3dd92c2f2d3d40a39efa64e0da7867e029 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 25 Jan 2021 10:26:20 +0000 Subject: [PATCH 3/3] Update bootstrap.sh --- hosting/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/bootstrap.sh b/hosting/bootstrap.sh index 12482b73e8..4e15481e64 100755 --- a/hosting/bootstrap.sh +++ b/hosting/bootstrap.sh @@ -17,4 +17,4 @@ fetch_config_files() { fetch_config_files # Start budibase -docker-compose --env-file hosting.properties up \ No newline at end of file +docker-compose --env-file hosting.properties up -d