From 42b648990548b5972682845d5e3ece7a41906953 Mon Sep 17 00:00:00 2001
From: Adria Navarro <adria@budibase.com>
Date: Wed, 4 Oct 2023 23:50:22 +0200
Subject: [PATCH] Add builder and pm2 config

---
 .github/workflows/release-singleimage-test.yml | 2 +-
 hosting/single/Dockerfile                      | 3 +++
 scripts/build-single-image.sh                  | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release-singleimage-test.yml b/.github/workflows/release-singleimage-test.yml
index 9e789e9bbf..5ebf170b13 100644
--- a/.github/workflows/release-singleimage-test.yml
+++ b/.github/workflows/release-singleimage-test.yml
@@ -49,7 +49,7 @@ jobs:
       - name: Run Yarn
         run: yarn
       - name: Run Yarn Build
-        run: yarn build --scope @budibase/server --scope @budibase/worker
+        run: yarn build --scope @budibase/builder --scope @budibase/server --scope @budibase/worker
       - name: Login to Docker Hub
         uses: docker/login-action@v2
         with:
diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile
index 8e55cdfc4a..99d3d928ce 100644
--- a/hosting/single/Dockerfile
+++ b/hosting/single/Dockerfile
@@ -30,8 +30,11 @@ RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn  yarn in
 
 # copy the actual code
 COPY packages/server/dist packages/server/dist
+COPY packages/server/pm2.config.js packages/server/pm2.config.js
 COPY packages/server/client packages/server/client
+COPY packages/server/builder packages/server/builder
 COPY packages/worker/dist packages/worker/dist
+COPY packages/worker/pm2.config.js packages/worker/pm2.config.js
 COPY packages/string-templates packages/string-templates
 
 
diff --git a/scripts/build-single-image.sh b/scripts/build-single-image.sh
index a9abe8c8da..d7302cc64d 100755
--- a/scripts/build-single-image.sh
+++ b/scripts/build-single-image.sh
@@ -1,4 +1,4 @@
 #!/bin/bash
-yarn build --scope @budibase/server --scope @budibase/worker
+yarn build --scope @budibase/builder --scope @budibase/server --scope @budibase/worker
 ./scripts/generatePackageNamesFile.sh
 docker build -f hosting/single/Dockerfile -t budibase:latest .