From 13c1e0c855ad2dc127dbc315ab07de51bbdb38b0 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 28 May 2024 13:51:41 +0100 Subject: [PATCH 1/2] Allow configuring base image for the single image Docker build. --- hosting/single/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile index e8ac306c51..7dd3c1ed22 100644 --- a/hosting/single/Dockerfile +++ b/hosting/single/Dockerfile @@ -1,3 +1,4 @@ +ARG BASEIMG=budibase/couchdb:v3.3.3 FROM node:20-slim as build # install node-gyp dependencies @@ -32,7 +33,7 @@ COPY packages/worker/dist packages/worker/dist COPY packages/worker/pm2.config.js packages/worker/pm2.config.js -FROM budibase/couchdb:v3.3.3 as runner +FROM $BASEIMG as runner ARG TARGETARCH ENV TARGETARCH $TARGETARCH #TARGETBUILD can be set to single (for single docker image) or aas (for azure app service) From 04a1c54e408c212201ca199dad7a479eaba8a7fc Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 28 May 2024 14:15:47 +0100 Subject: [PATCH 2/2] Create SQS single image build script and yarn task. --- package.json | 1 + scripts/build-single-image-sqs.sh | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 scripts/build-single-image-sqs.sh diff --git a/package.json b/package.json index f3a088b35e..41726f5cb4 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "build:digitalocean": "cd hosting/digitalocean && ./build.sh && cd -", "build:docker:single:multiarch": "docker buildx build --platform linux/arm64,linux/amd64 -f hosting/single/Dockerfile -t budibase:latest .", "build:docker:single": "./scripts/build-single-image.sh", + "build:docker:single:sqs": "./scripts/build-single-image-sqs.sh", "build:docker:dependencies": "docker build -f hosting/dependencies/Dockerfile -t budibase/dependencies:latest ./hosting", "publish:docker:couch": "docker buildx build --platform linux/arm64,linux/amd64 -f hosting/couchdb/Dockerfile -t budibase/couchdb:latest -t budibase/couchdb:v3.3.3 --push ./hosting/couchdb", "publish:docker:couch-sqs": "docker buildx build --platform linux/arm64,linux/amd64 -f hosting/couchdb/Dockerfile.v2 -t budibase/couchdb:v3.3.3-sqs --push ./hosting/couchdb", diff --git a/scripts/build-single-image-sqs.sh b/scripts/build-single-image-sqs.sh new file mode 100644 index 0000000000..502ba5fa14 --- /dev/null +++ b/scripts/build-single-image-sqs.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +yarn build:apps +version=$(./scripts/getCurrentVersion.sh) +docker build -f hosting/single/Dockerfile -t budibase:sqs --build-arg BUDIBASE_VERSION=$version --build-arg TARGETBUILD=single --build-arg BASEIMG=budibase/couchdb:v3.3.3-sqs .