{"id":458,"date":"2020-05-14T11:03:48","date_gmt":"2020-05-14T11:03:48","guid":{"rendered":"http:\/\/www.canchito-dev.com\/public\/blog\/?p=458"},"modified":"2021-05-02T13:39:00","modified_gmt":"2021-05-02T13:39:00","slug":"deploying-flowable-in-a-docker-container-and-mysql-part-2","status":"publish","type":"post","link":"https:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/14\/deploying-flowable-in-a-docker-container-and-mysql-part-2\/","title":{"rendered":"Deploying Flowable in a Docker Container and MySQL (Part 2)"},"content":{"rendered":"<h1>Deploying Flowable in a Docker Container and MySQL (Part 2)<\/h1>\n<div class=\"perfect-pullquote vcard pullquote-align-full pullquote-border-placement-left\"><blockquote><p><\/p>\n<p style=\"text-align: justify;\">This is the second part of our &#8220;Deploying Flowable in a Docker Container and MySQL&#8221; series. In this post, you will learn how to deploy Flowable&#8217;s war files in a container running Tomcat, and connecting to another container running use MySQL database.<\/p>\n<p><\/p><\/blockquote><\/div>\n<div>\n  <a class=\"donate-with-crypto\"\n     href=\"https:\/\/commerce.coinbase.com\/checkout\/faf64f90-2e80-46ee-aeba-0fde14cbeb46\"><br \/>\n    Buy Me a Coffee<br \/>\n  <\/a><br \/>\n  <script src=\"https:\/\/commerce.coinbase.com\/v1\/checkout.js?version=201807\">\n  <\/script>\n<\/div>\n<h2>What you\u2019ll need<\/h2>\n<ul>\n<li>About 30 minutes<\/li>\n<li>Docker Desktop for you operating system already installed. For this tutorial, we used Docker Desktop for Windows. You can download it from <a href=\"https:\/\/docs.docker.com\/docker-for-windows\/install\/\">here<\/a>.<\/li>\n<li>Download Flowable war files. You can download them from <a href=\"https:\/\/github.com\/flowable\/flowable-engine\/releases\/download\/flowable-6.5.0\/flowable-6.5.0.zip\">here<\/a>. We need a fresh copy without any modification.<\/li>\n<li>Download MySQL Connector\/J. You can download it from <a href=\"https:\/\/dev.mysql.com\/downloads\/connector\/j\/\">here<\/a>.<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">Introduction<\/h2>\n<p style=\"text-align: justify;\">In this article, you will learn how to deploy Flowable&#8217;s war file in a dockerized Tomcat environment and connecting to a container running MySQL. The main difference with the <a href=\"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/13\/deploying-flowable-in-a-docker-container-and-mysql-part-1\/\">first part of this series<\/a>, is that we will not modify the war files, instead, we will pass the database configuration properties as environment variables.<\/p>\n<p style=\"text-align: justify;\">If you would like to know how to compile from scratch Flowable&#8217;s source code so that is uses MySQL as default database source, and afterward deploy it in a dockerized environment, please have a look at our post <a href=\"http:\/\/www.canchito-dev.com\/public\/blog\/2019\/07\/05\/run-flowable-bpm-using-docker-and-mysql\">Run Flowable BPM using Docker and MySQL<\/a>.<\/p>\n<p style=\"text-align: justify;\">So let\u2019s get started!!<\/p>\n<h2>Folder Structure<\/h2>\n<p>This is the folder structure that we will be using for this tutorial:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">root \r\n  |- flowable-docker \r\n       |- wars \r\n           |- flowable-admin.war \r\n           |- flowable-idm.war \r\n           |- flowable-modeler.war \r\n           |- flowable-task.war \r\n       |- tomcat-users-xml \r\n       |- mysql-connector-java-8.0.20.jar\r\n       |- Dockerfile \r\n       |- docker-compose.xml<\/pre>\n<h2>Creating the Tomcat User file<\/h2>\n<p>So that we can access the management app&#8217;s web page that Tomcat offers, we can add some user with valid credentials and roles. Create the following file and called <em>tomcat-users.xml<\/em> under <code>flowable-docker folder<\/code>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;tomcat-users xmlns=\"http:\/\/tomcat.apache.org\/xml\"\r\n              xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n              xsi:schemaLocation=\"http:\/\/tomcat.apache.org\/xml tomcat-users.xsd\"\r\n              version=\"1.0\"&gt;\r\n  &lt;user \r\n       username=\"tomcat\" \r\n       password=\"tomcat\"\r\n       roles=\"tomcat,standard,manager-gui,manager-status,manager-script,manager-jmx\"\r\n  \/&gt;\r\n&lt;\/tomcat-users&gt;\r\n<\/pre>\n<p style=\"text-align: justify;\">Here, we have created a user called <code>tomcat<\/code>, with <code>tomcat<\/code> as password, and assigned the following roles: <code class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\">tomcat,standard,manager-gui,manager-status,manager-script,manager-jmx<\/code>.<\/p>\n<h2>Creating the Dockerfile<\/h2>\n<p style=\"text-align: justify;\">Docker has a simple file format called <a href=\"https:\/\/docs.docker.com\/reference\/builder\/\"><code>Dockerfile<\/code><\/a>, which uses to specify the _layers_ of an image. Having said this, let\u2019s go ahead and create a <code>Dockerfile<\/code> using your favorite text editor:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"dockerfile\"># Use an official Tomcat runtime as a parent image \r\nFROM tomcat:8.0-jre8 \r\n\r\nENV DIRPATH \/usr\/local\/tomcat \r\n\r\n# copy MySQL Connector\/J to Tomcat's \/lib folder\r\nCOPY .\/mysql-connector-java-8.0.20.jar $DIRPATH\/lib\r\n\r\n# Copy Tomcat users into the container at \/conf \r\nCOPY .\/tomcat-users.xml $DIRPATH\/conf \r\n\r\n# Copy flowable-admin war file into the container at \/webapps \r\nCOPY .\/wars\/flowable-admin.war $DIRPATH\/webapps \r\n\r\n# Copy flowable-idm war file into the container at \/webapps \r\nCOPY .\/wars\/flowable-idm.war $DIRPATH\/webapps \r\n\r\n# Copy flowable-modeler war file into the container at \/webapps \r\nCOPY .\/wars\/flowable-modeler.war $DIRPATH\/webapps \r\n\r\n# Copy flowable-task war file into the container at \/webapps \r\nCOPY .\/wars\/flowable-task.war $DIRPATH\/webapps \r\n\r\n# Make port 8080 available to the world outside this container \r\nEXPOSE 8080 \r\n\r\n# Run CMD \"catalina.sh\" when the container launches \r\nCMD [\"catalina.sh\", \"run\"]<\/pre>\n<p style=\"text-align: justify;\">This <code>Dockerfile<\/code> is very simple, but that\u2019s all you need to run a container with Tomcat. This is what the file does:<\/p>\n<ol>\n<li><code>COPY<\/code> <em>MySQL Connector\/J<\/em> to Tomcat&#8217;s library folder (<code>\/user\/local\/tomcat\/lib<\/code>).<\/li>\n<li><code>COPY<\/code> the file <em>tomcat-users.xml<\/em> to <code>\/user\/local\/tomcat\/conf<\/code><\/li>\n<li><code>COPY<\/code> <em>flowable-admin<\/em> war file into the container at <code>\/webapps<\/code><\/li>\n<li><code>COPY<\/code> <em>flowable-idm<\/em> war file into the container at <code>\/webapps<\/code><\/li>\n<li><code>COPY<\/code> <em>flowable-modeler<\/em> war file into the container at <code>\/webapps<\/code><\/li>\n<li><code>COPY<\/code> <em>flowable-task<\/em> war file into the container at <code>\/webapps<\/code><\/li>\n<li>Make port 8080 available to the world outside this container<\/li>\n<li>Run <code>CMD<\/code> <code>catalina.sh<\/code> when the container launches<\/li>\n<\/ol>\n<h2>Creating docker-compose.yml file<\/h2>\n<p style=\"text-align: justify;\">In the file, we specify container for MySQL (<em>mysql-db<\/em>), and Tomcat container (<em>tomcat<\/em>). Notice that we have included <a href=\"https:\/\/www.adminer.org\/en\/\">adminer<\/a> database manager, so that we can access the database from a web interface.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"dockerfile\">version: '3.7'\r\nservices:\r\n  mysql-db:\r\n    image: mysql:5.7.26\r\n    container_name: flowable-mysql-mysql-5.7.26\r\n    command: --default-authentication-plugin=mysql_native_password\r\n    restart: always\r\n    volumes:\r\n      - db_data:\/var\/lib\/mysql\r\n    environment:\r\n      MYSQL_ROOT_PASSWORD: flowable\r\n      MYSQL_USER: flowable\r\n      MYSQL_PASSWORD: flowable\r\n      MYSQL_DATABASE: flowable\r\n    ports:\r\n      - \"3306:3306\"\r\n    networks:\r\n      - flowable-mysql\r\n      \r\n  adminer:\r\n    image: adminer\r\n    restart: always\r\n    ports:\r\n      - 18080:8080\r\n    networks:\r\n      - flowable-mysql\r\n\r\n  tomcat:\r\n    build: .\r\n    image: tomcat:8.0-jre8\r\n    ports:\r\n      - \"8080:8080\" # Forward the exposed port 8080 on the container to port 8080 on the host machine\r\n    environment:\r\n      - SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.cj.jdbc.Driver\r\n      - SPRING_DATASOURCE_URL=jdbc:mysql:\/\/mysql-db:3306\/flowable?autoReconnect=true\r\n    depends_on:\r\n      - mysql-db # This service depends on mysql. Start that first.\r\n    restart: always\r\n    networks:\r\n      - flowable-mysql\r\n\r\n# Networks to be created to facilitate communication between containers\r\nnetworks:\r\n  flowable-mysql:\r\n\r\n# Volumes\r\nvolumes:\r\n    db_data: {}<\/pre>\n<p>So that the containers can communicate between them, we have created a network that we have called <em>flowable-mysql<\/em>.<\/p>\n<p style=\"text-align: justify;\">Let&#8217;s have a quick look at MysQL container&#8217;s configuration. When you start the\u00a0<code>mysql<\/code> image, you can adjust the configuration of the MySQL instance by passing one or more environment variables. Do note that none of the variables will have any effect if you start the container with a data directory that already contains a database: any pre-existing database will always be left untouched on container startup.<\/p>\n<p style=\"text-align: justify;\">With the environment variables that we are configuring, according to the official documentation, the database <em>flowable<\/em> will automatically be created, and the users <em>root<\/em> and <em>flowable<\/em> will be granted all privileges.<\/p>\n<p style=\"text-align: justify;\">Now, the main difference in the <code>docker-compose.yml<\/code> file in comparison with the <a href=\"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/13\/deploying-flowable-in-a-docker-container-and-mysql-part-1\/\">first part of this series<\/a>, is that we are passing the database connection configuration using environment variables. And since it is an environment variable, and all the war files use it, with just a few lines, we have made the same changes to all of Flowable&#8217;s war files.<\/p>\n<p><strong>Note<\/strong> that in the datasource url, we have used the name of the MySQL container as address.<\/p>\n<h2>Start the containers<\/h2>\n<p>Run the following command and build the images:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ docker-compose build\r\nmysql-db uses an image, skipping\r\nadminer uses an image, skipping\r\nBuilding tomcat\r\nStep 1\/10 : FROM tomcat:8.0-jre8\r\n8.0-jre8: Pulling from library\/tomcat\r\n05d1a5232b46: Pull complete\r\n5cee356eda6b: Pull complete\r\n89d3385f0fd3: Pull complete\r\n65dd87f6620b: Pull complete\r\n78a183a01190: Pull complete\r\n1a4499c85f97: Pull complete\r\n2c9d39b4bfc1: Pull complete\r\n1b1cec2222c9: Pull complete\r\nfc95b85a81f3: Pull complete\r\n0f3868647539: Pull complete\r\na3921d755681: Pull complete\r\n350389afc69e: Pull complete\r\nDigest: sha256:268403c3fa09afd9310ced7e83ac021927dca0f04a394a80a0b0220f62e056ed\r\nStatus: Downloaded newer image for tomcat:8.0-jre8\r\n ---&gt; 8391ef8f6ae4\r\nStep 2\/10 : ENV DIRPATH \/usr\/local\/tomcat\r\n ---&gt; Running in 951088cf3379\r\nRemoving intermediate container 951088cf3379\r\n ---&gt; ae39437307fc\r\nStep 3\/10 : COPY .\/mysql-connector-java-8.0.20.jar $DIRPATH\/lib\r\n ---&gt; 931acc846556\r\nStep 4\/10 : COPY .\/tomcat-users.xml $DIRPATH\/conf\r\n ---&gt; 19dc781b62bd\r\nStep 5\/10 : COPY .\/wars\/flowable-admin.war $DIRPATH\/webapps\r\n ---&gt; 6e468a040361\r\nStep 6\/10 : COPY .\/wars\/flowable-idm.war $DIRPATH\/webapps\r\n ---&gt; de88df9d2309\r\nStep 7\/10 : COPY .\/wars\/flowable-modeler.war $DIRPATH\/webapps\r\n ---&gt; 18e564f61a12\r\nStep 8\/10 : COPY .\/wars\/flowable-task.war $DIRPATH\/webapps\r\n ---&gt; bd41160d3365\r\nStep 9\/10 : EXPOSE 8080\r\n ---&gt; Running in a5bf538e4122\r\nRemoving intermediate container a5bf538e4122\r\n ---&gt; 9f2f907385f2\r\nStep 10\/10 : CMD [\"catalina.sh\", \"run\"]\r\n ---&gt; Running in 9e9e61a9e715\r\nRemoving intermediate container 9e9e61a9e715\r\n ---&gt; 6a1c0ba17f34\r\n\r\nSuccessfully built 6a1c0ba17f34\r\nSuccessfully tagged tomcat:8.0-jre8<\/pre>\n<p style=\"text-align: justify;\">In my case, I already had an image for <em>mysql-db<\/em> and <em>adminer<\/em>, so they were skipped. However, the <code>Dockerfile<\/code> was executed and an images was created with the name <em>tomcat<\/em>.<\/p>\n<p style=\"text-align: justify;\">Now we just need to start the containers based on these images:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ docker-compose up -d\r\nCreating network \"650-h2_flowable-mysql\" with the default driver\r\nCreating volume \"650-h2_db_data\" with default driver\r\nPulling mysql-db (mysql:5.7.26)...\r\n5.7.26: Pulling from library\/mysql\r\n0a4690c5d889: Pull complete\r\n98aa2fc6cbeb: Pull complete\r\n0777e6eb0e6f: Pull complete\r\n2464189c041c: Pull complete\r\nb45df9dc827d: Pull complete\r\nb42b00086160: Pull complete\r\nbb93567627c7: Pull complete\r\n48acc32b4863: Pull complete\r\n6257d2da4815: Pull complete\r\n1cd5ed3b2653: Pull complete\r\nf4ba7ff24ae9: Pull complete\r\nDigest: sha256:bdee7a98276ccf377d2c00b8ceaa9f65455a9376481467bbcc3d1e6b662dac5d\r\nStatus: Downloaded newer image for mysql:5.7.26\r\nPulling adminer (adminer:)...\r\nlatest: Pulling from library\/adminer\r\ncbdbe7a5bc2a: Pull complete\r\n1bc86e4cff5f: Pull complete\r\n7be142bd33f5: Pull complete\r\n8132c9e52be3: Pull complete\r\n4751eedb34cf: Pull complete\r\nd415e36b2fed: Pull complete\r\n496b1da48343: Pull complete\r\nc3bde6064779: Pull complete\r\n666d5bf6e1bf: Pull complete\r\n0a1f53fcd241: Pull complete\r\n346a17777f39: Pull complete\r\n5cc2b7995b6d: Pull complete\r\n1a1faca69724: Pull complete\r\n7102c95efcf2: Pull complete\r\n0ad90c826104: Pull complete\r\nDigest: sha256:1a5a60451570d8637f9fc794d9f1ef7ec1f3ed8cba0a9e45a6b6cb887837945b\r\nStatus: Downloaded newer image for adminer:latest\r\nCreating 650-h2_adminer_1            ... done\r\nCreating flowable-mysql-mysql-5.7.26 ... done\r\nCreating 650-h2_tomcat_1             ... done\r\n<\/pre>\n<p>if you list the active container, you should be able to see something like this:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ docker container ls -a\r\nCONTAINER ID        IMAGE                                         COMMAND                  CREATED             STATUS                      PORTS                               NAMES\r\nccbbc356e207        tomcat:8.0-jre8                               \"catalina.sh run\"        35 seconds ago      Up 35 seconds               0.0.0.0:8080-&gt;8080\/tcp              650_tomcat_1\r\nb375bf990bb4        adminer                                       \"entrypoint.sh docke\u2026\"   36 seconds ago      Up 35 seconds               0.0.0.0:18080-&gt;8080\/tcp             650_adminer_1\r\ndd61f326c79a        mysql:5.7.26                                  \"docker-entrypoint.s\u2026\"   36 seconds ago      Up 35 seconds               0.0.0.0:3306-&gt;3306\/tcp, 33060\/tcp   flowable-mysql-mysql-5.7.26<\/pre>\n<p>To see the logs of the tomcat container, type the command <code class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">docker logs -f CONTAINER_ID<\/code>.<\/p>\n<h2>Let&#8217;s see the result<\/h2>\n<p style=\"text-align: justify;\">After a few moments, you should be able to access Tomcat&#8217;s home page (<a href=\"http:\/\/localhost:8080\/\">http:\/\/localhost:8080\/<\/a>).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"441\" data-permalink=\"https:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/13\/deploying-flowable-in-a-docker-container-and-mysql-part-1\/tomcat_main_page-2\/\" data-orig-file=\"https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png\" data-orig-size=\"1012,925\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CANCHITO-DEV: Tomcat Main\" data-image-description=\"&lt;p&gt;CANCHITO-DEV: Tomcat Main&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;CANCHITO-DEV: Tomcat Main&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png\" class=\"aligncenter wp-image-441 size-full\" src=\"http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png\" alt=\"CANCHITO-DEV: Tomcat Main\" width=\"1012\" height=\"925\" srcset=\"https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png 1012w, https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1-300x274.png 300w, https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1-768x702.png 768w, https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1-624x570.png 624w\" sizes=\"auto, (max-width: 1012px) 100vw, 1012px\" \/><\/p>\n<p>Now, click on the button <strong>&lt;Manager App&gt;<\/strong>. It should prompt you for the credentials that we previously created.<\/p>\n<p>Make sure that Flowable&#8217;s apps are up and running.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"447\" data-permalink=\"https:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/13\/deploying-flowable-in-a-docker-container-and-mysql-part-1\/tomcat_manager_app\/\" data-orig-file=\"https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app.png\" data-orig-size=\"1900,860\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CANCHITO-DEV: Tomcat Manager App\" data-image-description=\"&lt;p&gt;CANCHITO-DEV: Tomcat Manager App&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;CANCHITO-DEV: Tomcat Manager App&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-1024x463.png\" class=\"aligncenter wp-image-447 size-full\" src=\"http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app.png\" alt=\"CANCHITO-DEV: Tomcat Manager App\" width=\"1900\" height=\"860\" srcset=\"https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app.png 1900w, https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-300x136.png 300w, https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-1024x463.png 1024w, https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-768x348.png 768w, https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-1536x695.png 1536w, https:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-624x282.png 624w\" sizes=\"auto, (max-width: 1900px) 100vw, 1900px\" \/><\/p>\n<p>If they are, you should be able to access Flowable&#8217;s apps by visiting the following URLs:<\/p>\n<ul>\n<li>Flowable IDM: <a href=\"http:\/\/localhost:8080\/flowable-idm\/\">http:\/\/localhost:8080\/flowable-idm\/<\/a><\/li>\n<li>Flowable Admin: <a href=\"http:\/\/localhost:8080\/flowable-admin\/\">http:\/\/localhost:8080\/flowable-admin\/<\/a><\/li>\n<li>Flowable Modeler: <a href=\"http:\/\/localhost:8080\/flowable-modeler\/\">http:\/\/localhost:8080\/flowable-modeler\/<\/a><\/li>\n<li>Flowable Task: <a href=\"http:\/\/localhost:8080\/flowable-task\/\">http:\/\/localhost:8080\/flowable-task\/<\/a><\/li>\n<\/ul>\n<p>Remember that you will be prompted to log in by Flowable&#8217;s IDM. Enter <em>admin<\/em> as user and <em>test<\/em> as password.<\/p>\n<h2>Stopping the container<\/h2>\n<p style=\"text-align: justify;\">When you are done working with Flowable&#8217;s apps, you can stop and remove Docker containers, images, networks and volumes.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ docker-compose down -v\r\nStopping 650_tomcat_1                ... done\r\nStopping 650_adminer_1               ... done\r\nStopping flowable-mysql-mysql-5.7.26 ... done\r\nRemoving 650_tomcat_1                ... done\r\nRemoving 650_adminer_1               ... done\r\nRemoving flowable-mysql-mysql-5.7.26 ... done\r\nRemoving network 650_flowable-mysql\r\nRemoving volume 650_db_data<\/pre>\n<h2>Summary<\/h2>\n<p style=\"text-align: justify;\">In this post, we have shown how to deploy Flowable&#8217;s war files in a dockerized environment and using a MySQL database. We hope that, even though this was a very basic introduction, you understood how to use and configure them. We will try to go deeper into Flowable in upcoming posts.<\/p>\n<p style=\"text-align: justify;\">Please feel free to contact us. We will gladly response to any doubt or question you might have.<\/p>\n<p>If you like it, read our first part <a href=\"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/13\/deploying-flowable-in-a-docker-container-and-mysql-part-1\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the second part of our &#8220;Deploying Flowable in a Docker Container and MySQL&#8221; series. In this post, you will learn how to deploy Flowable&#8217;s war files in a container running Tomcat, and connecting to another container running use MySQL database.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[31,62,74,30,61,47,3,65],"tags":[18,63,75,34,76],"class_list":["post-458","post","type-post","status-publish","format-standard","hentry","category-bpm","category-docker","category-docker-compose","category-flowable","category-flowable-bpm","category-open-source","category-spring","category-spring-boot","tag-bpm","tag-docker","tag-docker-compose","tag-flowable","tag-mysql-open-source"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p8EwXo-7o","jetpack-related-posts":[{"id":423,"url":"https:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/13\/deploying-flowable-in-a-docker-container-and-mysql-part-1\/","url_meta":{"origin":458,"position":0},"title":"Deploying Flowable in a Docker Container and MySQL (Part 1)","author":"canchitodev","date":"May 13, 2020","format":false,"excerpt":"In this post, you will learn how to adapt Flowable's war files to use MySQL as a database source. Once this is done, we will deploy them in a dockerized environment.","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"https:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"CANCHITO-DEV: Tomcat Main","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png?resize=700%2C400 2x"},"classes":[]},{"id":356,"url":"https:\/\/www.canchito-dev.com\/public\/blog\/2019\/07\/05\/run-flowable-bpm-using-docker-and-mysql\/","url_meta":{"origin":458,"position":1},"title":"Run Flowable BPM using Docker and MySQL","author":"canchitodev","date":"July 5, 2019","format":false,"excerpt":"In this article, you will learn how to compile Flowable source code using MySQL as database source, and generate valid Docker images. Once you have the images, we will use Docker Compose for defining and running a multi-container Docker applications.","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"https:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":477,"url":"https:\/\/www.canchito-dev.com\/public\/blog\/2020\/06\/27\/use-flowable-apps-with-a-custom-rest-api\/","url_meta":{"origin":458,"position":2},"title":"Use Flowable Apps with a Custom REST API","author":"canchitodev","date":"June 27, 2020","format":false,"excerpt":"In this post, you will learn how configure Flowable's apps to use your custom Spring Boot REST API as a backend engine. All this, in a dockerized environment.","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"https:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"CANCHITO-DEV: Tomcat Main","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png?resize=700%2C400 2x"},"classes":[]},{"id":372,"url":"https:\/\/www.canchito-dev.com\/public\/blog\/2020\/06\/07\/create-custom-service-tasks-for-flowable\/","url_meta":{"origin":458,"position":3},"title":"Create Custom Service Tasks for Flowable","author":"canchitodev","date":"June 7, 2020","format":false,"excerpt":"In\u00a0this\u00a0tutorial,\u00a0we\u00a0will\u00a0be\u00a0implementing\u00a0a\u00a0custom\u00a0service\u00a0task\u00a0in\u00a0Flowable\u00a0","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"https:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"CANCHITO-DEV: Spring Initializr","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=700%2C400 2x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=1050%2C600 3x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=1400%2C800 4x"},"classes":[]},{"id":471,"url":"https:\/\/www.canchito-dev.com\/public\/blog\/2020\/06\/27\/flowable-custom-engine-configuration\/","url_meta":{"origin":458,"position":4},"title":"Customizing Flowable Engine","author":"canchitodev","date":"June 27, 2020","format":false,"excerpt":"In this article, we will go into detail on how to customize Flowable's engine. Three changes to the engine will be done: (1) Change the database connection by modifying the data source and adding custom data source properties. (2)Use a strong UUID generator. (3)Implement a custom event handler.","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"https:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"CANCHITO-DEV: Spring Initializr","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr-1024x674.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr-1024x674.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr-1024x674.png?resize=525%2C300 1.5x"},"classes":[]},{"id":370,"url":"https:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/12\/integrate-flowable-into-your-spring-boot-application\/","url_meta":{"origin":458,"position":5},"title":"Integrate Flowable into your Spring Boot Application","author":"canchitodev","date":"May 12, 2020","format":false,"excerpt":"In\u00a0this\u00a0tutorial,\u00a0we\u00a0will\u00a0be\u00a0integrating\u00a0Flowable's\u00a0BPM\u00a0engine\u00a0into\u00a0our\u00a0Spring\u00a0Boot\u00a0application.","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"https:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"CANCHITO-DEV: Spring Initializr","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr-1024x674.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr-1024x674.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr-1024x674.png?resize=525%2C300 1.5x"},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts\/458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/comments?post=458"}],"version-history":[{"count":6,"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts\/458\/revisions"}],"predecessor-version":[{"id":536,"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts\/458\/revisions\/536"}],"wp:attachment":[{"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/media?parent=458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/categories?post=458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/tags?post=458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}