{"id":423,"date":"2020-05-13T16:16:26","date_gmt":"2020-05-13T16:16:26","guid":{"rendered":"http:\/\/www.canchito-dev.com\/public\/blog\/?p=423"},"modified":"2021-05-02T13:42:42","modified_gmt":"2021-05-02T13:42:42","slug":"deploying-flowable-in-a-docker-container-and-mysql-part-1","status":"publish","type":"post","link":"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/13\/deploying-flowable-in-a-docker-container-and-mysql-part-1\/","title":{"rendered":"Deploying Flowable in a Docker Container and MySQL (Part 1)"},"content":{"rendered":"<h1>Deploying Flowable in a Docker Container and MySQL (Part 1)<\/h1>\n<div class=\"perfect-pullquote vcard pullquote-align-full pullquote-border-placement-left\"><blockquote><p><\/p>\n<p>This is the first part of our &#8220;Deploying Flowable in a Docker Container and MySQL&#8221; series. In this post, you will learn how to adapt Flowable&#8217;s war files to use MySQL as a database source. Once this is done, we will deploy them in a dockerized environment.<\/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. Once you have the images, we will use Docker Compose for defining and running a multi-container Docker applications.<\/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       |- 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<\/code>\u00a0folder:<\/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 <em>layers<\/em>\u00a0of 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 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> 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    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<h2>Modifying War file to use MySQL<\/h2>\n<p style=\"text-align: justify;\">Because of license constraints, the official Flowable&#8217;s war file do not come with the MySQL connectors included. So, we will do some modifications to the war files, so that when they are copied to our Tomcat container, they can be deployed with MySQL connector.<\/p>\n<p>Download <a href=\"https:\/\/dev.mysql.com\/downloads\/connector\/j\/\">MySQL Connector\/J<\/a>. Once you have it, do the following steps:<\/p>\n<ol>\n<li>\u00a0Open a war file using <a href=\"https:\/\/www.rarlab.com\/download.htm\">Winrar<\/a> or similar.<\/li>\n<li>Navigate to folder <code>WEB-INF\/lib<\/code> and copy the <a href=\"https:\/\/dev.mysql.com\/downloads\/connector\/j\/\">MySQL Connector\/J<\/a>.<\/li>\n<li>Now, go to <code>WEB-INF\/classes<\/code>, and open <code>flowable-default.properties<\/code> file for editing.\n<ul>\n<li>Comment the lines in which it specifies that the app should connect to an H2 database.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#spring.datasource.driver-class-name=org.h2.Driver\r\n#spring.datasource.url=jdbc:h2:~\/flowable-db\/db;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=9091;DB_CLOSE_DELAY=-1<\/pre>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Uncomment the lines in which it specifies that the app should connect to a MySQL database and modified as follow:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver\r\nspring.datasource.url=jdbc:mysql:\/\/mysql-db:3306\/flowable?characterEncoding=UTF-8<\/pre>\n<p><strong>Note<\/strong> that in the datasource url, we have used the name of the MySQL container as address.<\/p>\n<p>Repeat the above steps for each war file.<\/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\/9 : FROM tomcat:8.0-jre8\r\n ---&gt; 8391ef8f6ae4\r\nStep 2\/9 : ENV DIRPATH \/usr\/local\/tomcat\r\n ---&gt; Using cache\r\n ---&gt; 79fb5ffc0bc1\r\nStep 3\/9 : COPY .\/tomcat-users.xml $DIRPATH\/conf\r\n ---&gt; a6f497f3bb44\r\nStep 4\/9 : COPY .\/wars\/flowable-admin.war $DIRPATH\/webapps\r\n ---&gt; 5a79ea7d3522\r\nStep 5\/9 : COPY .\/wars\/flowable-idm.war $DIRPATH\/webapps\r\n ---&gt; 4aeb2dac4ad6\r\nStep 6\/9 : COPY .\/wars\/flowable-modeler.war $DIRPATH\/webapps\r\n ---&gt; 395a049722bb\r\nStep 7\/9 : COPY .\/wars\/flowable-task.war $DIRPATH\/webapps\r\n ---&gt; e61f4317b26f\r\nStep 8\/9 : EXPOSE 8080\r\n ---&gt; Running in 78209cc2b1dd\r\nRemoving intermediate container 78209cc2b1dd\r\n ---&gt; 5b87278c11d4\r\nStep 9\/9 : CMD [\"catalina.sh\", \"run\"]\r\n ---&gt; Running in 633e2736b554\r\nRemoving intermediate container 633e2736b554\r\n ---&gt; 042f08f229dc\r\n\r\nSuccessfully built 042f08f229dc\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_flowable-mysql\" with the default driver\r\nCreating volume \"650_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: Already exists\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 flowable-mysql-mysql-5.7.26 ... done\r\nCreating 650_adminer_1               ... done\r\nCreating 650_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=\"http:\/\/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=\"http:\/\/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=\"http:\/\/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=\"http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1.png 1012w, http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1-300x274.png 300w, http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_main_page-1-768x702.png 768w, http:\/\/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=\"http:\/\/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=\"http:\/\/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=\"http:\/\/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=\"http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app.png 1900w, http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-300x136.png 300w, http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-1024x463.png 1024w, http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-768x348.png 768w, http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/tomcat_manager_app-1536x695.png 1536w, http:\/\/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 second part <a href=\"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/14\/deploying-flowable-in-a-docker-container-and-mysql-part-2\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, you will learn how to adapt Flowable&#8217;s war files to use MySQL as a database source. Once this is done, we will deploy them in a dockerized environment.<\/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_post_was_ever_published":false,"_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":""},"categories":[31,62,74,30,61,47],"tags":[18,63,75,34,76],"class_list":["post-423","post","type-post","status-publish","format-standard","hentry","category-bpm","category-docker","category-docker-compose","category-flowable","category-flowable-bpm","category-open-source","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-6P","jetpack-related-posts":[{"id":458,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/05\/14\/deploying-flowable-in-a-docker-container-and-mysql-part-2\/","url_meta":{"origin":423,"position":0},"title":"Deploying Flowable in a Docker Container and MySQL (Part 2)","author":"canchitodev","date":"May 14, 2020","format":false,"excerpt":"This is the second part of our \"Deploying Flowable in a Docker Container and MySQL\" series. In this post, you will learn how to deploy Flowable's war files in a container running Tomcat, and connecting to another container running use MySQL database.","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"http:\/\/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":"http:\/\/www.canchito-dev.com\/public\/blog\/2019\/07\/05\/run-flowable-bpm-using-docker-and-mysql\/","url_meta":{"origin":423,"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":"http:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":477,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/06\/27\/use-flowable-apps-with-a-custom-rest-api\/","url_meta":{"origin":423,"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":"http:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"CANCHITO-DEV: Process engine deployments in Flowable Admin","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/process-engine-deployments.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/process-engine-deployments.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/process-engine-deployments.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/process-engine-deployments.png?resize=700%2C400 2x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/process-engine-deployments.png?resize=1050%2C600 3x"},"classes":[]},{"id":471,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/06\/27\/flowable-custom-engine-configuration\/","url_meta":{"origin":423,"position":3},"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":"http:\/\/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":372,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/06\/07\/create-custom-service-tasks-for-flowable\/","url_meta":{"origin":423,"position":4},"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":"http:\/\/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":184,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2018\/03\/30\/asynchronous-service-invocation-using-flowable\/","url_meta":{"origin":423,"position":5},"title":"Asynchronous Service Invocation using Flowable","author":"canchitodev","date":"March 30, 2018","format":false,"excerpt":"In this article, I will explain one possible method to solved some \"limitations\" encountered during the integration and implementation of\u00a0Flowable BPM, when executing long-running tasks, by implementing the Signallable Flowable Behavior and a database table as a task queue. Similar behavior can be achieved using Flowable's send task and receive\u2026","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"http:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"CANCHITO-DEV: Task Queue Service","src":"https:\/\/i0.wp.com\/canchito-dev.com\/img\/cwm\/userguide\/canchito_dev_task_queue_service.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts\/423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/comments?post=423"}],"version-history":[{"count":24,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts\/423\/revisions"}],"predecessor-version":[{"id":542,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts\/423\/revisions\/542"}],"wp:attachment":[{"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/media?parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/categories?post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/tags?post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}