From f1c7a46d37d92a9b4cd5131d2f7ac367fa153e39 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 7 Jan 2021 11:38:37 +0000 Subject: [PATCH] Adding a build method which can push docker images if you are logged in to docker CLI and making the main docker compose file use the pushed images instead. --- .gitignore | 1 + hosting/.env | 1 + hosting/build/docker-compose.yaml | 16 ++ hosting/build/server | 1 + hosting/build/worker | 1 + hosting/docker-compose.yaml | 6 +- hosting/scripts/.release-to-docker-hub.sh.swp | Bin 0 -> 12288 bytes .../{ => scripts}/install-docker-compose.sh | 0 hosting/scripts/release-to-docker-hub.sh | 9 + hosting/server | 1 - hosting/worker | 1 - packages/server/yarn.lock | 239 +++++++++++++++++- 12 files changed, 263 insertions(+), 13 deletions(-) create mode 120000 hosting/.env create mode 100644 hosting/build/docker-compose.yaml create mode 120000 hosting/build/server create mode 120000 hosting/build/worker create mode 100644 hosting/scripts/.release-to-docker-hub.sh.swp rename hosting/{ => scripts}/install-docker-compose.sh (100%) create mode 100755 hosting/scripts/release-to-docker-hub.sh delete mode 120000 hosting/server delete mode 120000 hosting/worker diff --git a/.gitignore b/.gitignore index 54401c6b36..edad41cdec 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,7 @@ typings/ # dotenv environment variables file .env +!hosting/.env # parcel-bundler cache (https://parceljs.org/) .cache diff --git a/hosting/.env b/hosting/.env new file mode 120000 index 0000000000..bb1b54ad77 --- /dev/null +++ b/hosting/.env @@ -0,0 +1 @@ +hosting.properties \ No newline at end of file diff --git a/hosting/build/docker-compose.yaml b/hosting/build/docker-compose.yaml new file mode 100644 index 0000000000..6988e3841b --- /dev/null +++ b/hosting/build/docker-compose.yaml @@ -0,0 +1,16 @@ +version: "3" + +services: + app-service: + build: ./server + volumes: + - ./server:/app + environment: + SELF_HOSTED: 1 + PORT: 4002 + + worker-service: + build: ./worker + environment: + SELF_HOSTED: 1, + PORT: 4003 diff --git a/hosting/build/server b/hosting/build/server new file mode 120000 index 0000000000..c40730cce5 --- /dev/null +++ b/hosting/build/server @@ -0,0 +1 @@ +../../packages/server/ \ No newline at end of file diff --git a/hosting/build/worker b/hosting/build/worker new file mode 120000 index 0000000000..8582fefbee --- /dev/null +++ b/hosting/build/worker @@ -0,0 +1 @@ +../../packages/worker/ \ No newline at end of file diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index cfdbc48e5f..b0e3941c93 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -2,9 +2,7 @@ version: "3" services: app-service: - build: ./server - volumes: - - ./server:/app + image: budibase/budibase-apps ports: - "${APP_PORT}:4002" environment: @@ -20,7 +18,7 @@ services: - worker-service worker-service: - build: ./worker + image: budibase/budibase-worker ports: - "${WORKER_PORT}:4003" environment: diff --git a/hosting/scripts/.release-to-docker-hub.sh.swp b/hosting/scripts/.release-to-docker-hub.sh.swp new file mode 100644 index 0000000000000000000000000000000000000000..e7830335a2abae303fc88182df1d5856eaa6eef0 GIT binary patch literal 12288 zcmeI&y-ve05C`xp8v`GLktL<9PD&Z57}*#)wv1Ii+$L&TTd`A^U}fZicmNh2gM|?x zW-c^QDYV^-{*g{@oU?uYNg1j*X!fo;PTOq~U;9MQZ=e11>k~Ta5RH?O6p@@3kJep9 z9;b<3lG)r(FV*ex?7M10FUX@L@Qs}Rh?TL)WaybNOSCm!CR51?!YUD|a3nJk=YebD z