From 5d8c7662e553fb1184817ee6dda0149f9e1b2520 Mon Sep 17 00:00:00 2001 From: benjaminparisel Date: Mon, 27 Jan 2025 10:37:40 +0100 Subject: [PATCH 1/2] feat: Document several deployment strategies for UIB pages closes [BPM-387](https://bonitasoft.atlassian.net/browse/BPM-387) --- .../package-and-deploy-your-application.adoc | 30 +++++++++++++++++-- .../pages/design-methodology.adoc | 2 +- .../package-and-deploy-sca-application.adoc | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/modules/applications/pages/ui-builder/package-and-deploy-your-application.adoc b/modules/applications/pages/ui-builder/package-and-deploy-your-application.adoc index ef94f3c205..f6c27ddfba 100644 --- a/modules/applications/pages/ui-builder/package-and-deploy-your-application.adoc +++ b/modules/applications/pages/ui-builder/package-and-deploy-your-application.adoc @@ -20,15 +20,41 @@ image:ui-builder/advanced-app/export-application.png[Export application] Move the exported JSON application(s) in a designated `workspace` folder. This folder will be referenced during the build process. You can store these applications in a Git repository too. -=== Build the production binary +=== Deployment strategies + +There are several ways to deploy your application in production: + +==== 1. Build the production binary To create the production-ready binary, you need to build a Docker image. This image will contain the application(s) and the Bonita UI Builder runtime. The xref:production-packaging.adoc#dockerfile[Dockerfile] and more details on how to build the Docker image can be found in this xref:production-packaging.adoc[dedicated page]. +[NOTE] +==== +This strategy is the most common and recommended way to deploy your application in production. It allows you to be close with the xref:getting-started:package-and-deploy-sca-application.adoc[application packaging] strategy. +==== + +==== 2. Use a default UI Builder image and mount and mounted volume + +With this strategy, you can use the default Bonita UI Builder image and mount a volume containing your applications. + +You don't need to build a new image, but you need to ensure the volume is correctly mounted and declared on the xref:applications:ui-builder/production-packaging.adoc#run-production-binaries [dockre compose file]. + +[source, yaml] +---- + volumes: + - :/opt/appsmith/workspace/applications +---- + +[WARNING] +-- +This strategy don't set by default the `BONITA_DEV_MODE` to `false`. You need to set it manually in the environment variables in docker compose file. +-- + === Run the production binary -After building the Docker image, run it by following xref:production-packaging.adoc#run-production-binaries[the specific instructions]. +Run it by following xref:production-packaging.adoc#run-production-binaries[the specific instructions]. === Access your Application diff --git a/modules/best-practices/pages/design-methodology.adoc b/modules/best-practices/pages/design-methodology.adoc index 97909412c2..5d3f4b68e9 100644 --- a/modules/best-practices/pages/design-methodology.adoc +++ b/modules/best-practices/pages/design-methodology.adoc @@ -67,7 +67,7 @@ Here again, the negotiation between the need and how it can be efficiently rende When the UI mockups are precise enough from the workshops, they are ready to be implemented in Bonita: * For forms: from the pool _Execution_ properties (instantiation form and case overview), and human tasks (task forms) -* For application pages: directly from the UI Designer +* For application pages: directly from the UI Builder ==== Business Data Model diff --git a/modules/getting-started/pages/package-and-deploy-sca-application.adoc b/modules/getting-started/pages/package-and-deploy-sca-application.adoc index 9e6812ca8d..b44ebba228 100644 --- a/modules/getting-started/pages/package-and-deploy-sca-application.adoc +++ b/modules/getting-started/pages/package-and-deploy-sca-application.adoc @@ -17,6 +17,7 @@ You have to add them manually if you want to deploy them. To do it: * Add the desired default applications to your project * In the pom.xml file, you will see the new dependencies added for the application +[[package-application]] === Packaging as a docker image To package your application as a docker image, you need to run this commands at the root of your project: From 76f828c1207c7cc8a95605f701789d1d00130805 Mon Sep 17 00:00:00 2001 From: Benjamin Parisel Date: Mon, 27 Jan 2025 15:02:27 +0100 Subject: [PATCH 2/2] Update modules/applications/pages/ui-builder/package-and-deploy-your-application.adoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Souchet CĂ©line <4921914+csouchet@users.noreply.github.com> --- .../pages/ui-builder/package-and-deploy-your-application.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/applications/pages/ui-builder/package-and-deploy-your-application.adoc b/modules/applications/pages/ui-builder/package-and-deploy-your-application.adoc index f6c27ddfba..498be4b285 100644 --- a/modules/applications/pages/ui-builder/package-and-deploy-your-application.adoc +++ b/modules/applications/pages/ui-builder/package-and-deploy-your-application.adoc @@ -39,7 +39,7 @@ This strategy is the most common and recommended way to deploy your application With this strategy, you can use the default Bonita UI Builder image and mount a volume containing your applications. -You don't need to build a new image, but you need to ensure the volume is correctly mounted and declared on the xref:applications:ui-builder/production-packaging.adoc#run-production-binaries [dockre compose file]. +You don't need to build a new image, but you need to ensure the volume is correctly mounted and declared on the xref:applications:ui-builder/production-packaging.adoc#run-production-binaries [docker compose file]. [source, yaml] ----