Hi Tirthankar,
You probably need to set up the Object Gateway classpath correctly.

I've just got it working as follows:

  1. Get the proper .jar files

I've copied them from the jgw container:

docker cp jgw:/jgw/FirstDemo.jar shared/ 
docker cp jgw:/jgw/gson-2.8.5.jar shared/     
docker cp jgw:/jgw/intersystems-gateway-3.1.0.jar shared/
docker cp jgw:/jgw/intersystems-jdbc-3.1.0.jar shared/    
docker cp jgw:/jgw/intersystems-utils-3.1.0.jar shared/

You can also generate your .jar files, just make sure it contains all the required dependencies.

  1. Set up your local Object Gateway:
  • IP address: 127.0.0.1
  • Port: 4444
  • ClassPath: /shared/FirstDemo.jar:/shared/gson-2.8.5.jar:/shared/intersystems-utils-3.1.0.jar

After that, start your Object Gateway, you should see something like:
Executing O.S. command: java -Xrs -classpath /shared/FirstDemo.jar:/shared/gson-2.8.5.jar:/shared/intersystems-utils-3.1.0.jar:/usr/irissys/dev/java/lib/JDK18/intersystems-gateway-3.1.0.jar:/usr/irissys/dev/java/lib/JDK18/intersystems-jdbc-3.1.0.jar com.intersystems.gateway.JavaGateway 4444 "" "" 127.0.0.1 ""

  1. Modify some of the PEX components in the production, e.g. FirstOperation:
  • Gateway Host: localhost
  • Gateway Port: 4444

That should work.

Hi Cristiano,

Backend image is built using this Dockerfile

In this case, it is downloading RESTForms2 using wget and then loading it into IRIS. The download is done in the Dockerfile using wget https://github.com/intersystems-community/RESTForms2/archive/master.tar.gz

Make sure in your logs that you had no errors while downloading RESTForms using wget.

Hi Mario,

I guess you need to run some routine to export/import your classes from a Linux shell.

You can use operating system authentication when opening a terminal session:

- Allow "Operating System authentication" in System > Security Management > Authentication/CSP Session Options

- Allow "Operating System authentication" System > Security Management > Services > Terminal
- Create a user in cache with the same username as the user in Linux that will run the bash script.

 

Then you can just invoke a routine / classmethod from your linux shell and use $system.OBJ.Export / Import to export or import classes, include files, etc.

You should also think about using Ens.Director to stop / start production or business hosts as needed.
For instance:

[cacheowner@demo tmp]$ whoami
cacheowner
[cacheowner@demo tmp]$ ccontrol session HSEX15 "##class(Test.MyClass).Run()"
Run!
Exporting to XML started on 12/23/2015 16:25:57
Exporting routine: Test.MyInclude.inc
Export finished successfully.

Where:
Class Test.MyClass Extends %RegisteredObject
{
ClassMethod Run() As %Status
{
set ret = $$$OK
try {
write "Run!",!
do $system.OBJ.Export("Test.MyInclude.inc","/tmp/include.xml")
} catch ex {
set ret = ex.AsStatus()
do $system.Status.DisplayError(ret)
}
quit ret
}
}

Anyway, you can check out the Ensemble production deployment capabilities:
http://docs.intersystems.com/ens20152/csp/docbook/DocBook.UI.Page.cls?KEY=EGDV_deploying