How to Deploy a Domain Project and Applications Associated with it on a Standalone On-Premise Server

Author: Sanket Kangle

 

First of all, if you do not know how to create a domain project, follow this article. Now when you are ready with a domain project and other applications dependent on that, and you want to deploy it on-premise server(in this demo, our local machine), you can follow the following steps.

 

Step 1: getting the standalone server up and running

Download and extract the Mule 4 standalone from here. Extract it to a suitable location. Add that address in your environment variable. You should see the following folder structure in the extracted folder.

 

 

Go to the “bin” folder and open the command prompt there. Run “Mule.bat” command there(for Windows system)

 

 

Step 2: deploying domain project on this standalone server

Extract the deployable jar of the domain project and copy it to the “domains” folder in your standalone directory

 

 

As soon as you add it, the standalone server will automatically extract it and start deploying it.

 

 

You should see it gets deployed and an anchor file is created in the folder as well. If you delete that anchor file, your application will get undeployed.

 

 

You can also see that the default domain is also there with our custom domain.

 

Step 3: deploy application associated with domain project

Same as the above step, put your deployable jar file of the project in the “apps” folder instead of “domains

 

 

Your application will be deployed

 

 

This application will also have an anchor file, which if you delete, will undeploy your application.

 

 

When removed anchor file, it gets undeployed as below

 

 

You can simply place the jar file again in the folder to deploy the application again. 

Hope this was helpful. Happy learning!

We use cookies on this site to enhance your user experience. For a complete overview of how we use cookies, please see our privacy policy.