Skip to content

Customizing Docker Script Executors

Nolan Ehrstrom edited this page Mar 18, 2020 · 25 revisions

Issue: https://github.com/ProcessMaker/processmaker/issues/2887

How-to video: https://drive.google.com/file/d/1-Rueb-xCwRL8sDg9HTJWU2lJ45YLJx1D/view?usp=sharing

Deployment

  1. The following PRs must be merged

  2. Put php, lua, and node on Packagist. Republish the others.

Testing

  • Verify that base images were automatically built and deployed to docker hub as processmaker4/executor-{lang}

Setup

  1. Install any executors you would like on the instance with composer require processmaker/docker-executor-{lang}
  2. The install script for each language must be re-run from core, even if the language was previously installed. For example: php artisan docker-executor-php:install

Usage

In an instance of PM4, click on Admin on the top menu, then Script Executors on the side menu.

Add any docker commands to customize the executor. For example, in the PHP script executor, you can add the google api by adding the line RUN composer require google/apiclient:^2.0

Known Issues

  • C# SDK will not build. FilesApi.cs and RequestFilesApi.cs are attempting to send a List<System.IO.Stream> to ParameterToFile() which only accepts System.IO.Stream. I don't know if this is an annotation problem or a bug in openapi. SDK has been commented out in the default dockerfile for the csharp package. Issue to enable it later: https://github.com/ProcessMaker/docker-executor-csharp/issues/1
  • SDK Builder is using openapitools/openapi-generator-cli:v4.2.2 (set in ProcessMaker/BuildSdk.php). v4.2.3 is available but breaks the Java sdk. (v4.2.3 does not seem to fix the above C# issue anyway)

Clone this wiki locally