{"id":86792,"date":"2023-01-27T20:31:24","date_gmt":"2023-01-27T20:31:24","guid":{"rendered":"https:\/\/www.techrepublic.com\/?p=4028648"},"modified":"2023-01-27T20:31:24","modified_gmt":"2023-01-27T20:31:24","slug":"how-to-easily-deploy-a-full-stack-application-in-portainer-with-templates","status":"publish","type":"post","link":"https:\/\/cloudnewshub.com\/?p=86792","title":{"rendered":"How to easily deploy a full-stack application in Portainer with templates"},"content":{"rendered":"<div id>\n<p> Deploying a complex Docker stack isn&#8217;t nearly as challenging as you think, at least when Portainer is your GUI of choice. Find out how easy this is with Portainer templates. <\/p>\n<\/div>\n<div id>\n<figure id=\"attachment_4028662\" aria-describedby=\"caption-attachment-4028662\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-4028662\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2023\/01\/how-to-easily-deploy-a-full-stack-application-in-portainer-with-templates.jpg\" alt width=\"770\" height=\"513\"><figcaption id=\"caption-attachment-4028662\" class=\"wp-caption-text\">Image: BalanceFormCreative\/Adobe Stock<\/figcaption><\/figure>\n<p>When you think of deploying a full-stack, containerized application, you probably expect it to be a tedious and complicated task of manually writing a manifest and hoping it deploys correctly. Although developers who are well-versed in YAML and Docker manifests would say it\u2019s not a difficult thing to do, if you\u2019re even remotely new to containers, the process can be pretty daunting.<\/p>\n<p><strong>SEE: <a href=\"https:\/\/www.techrepublic.com\/resource-library\/whitepapers\/hiring-kit-python-developer\/\" target=\"_blank\" rel=\"noopener noreferrer\">Hiring kit: Python developer<\/a> (TechRepublic Premium)<\/strong><\/p>\n<aside class=\"pinbox right\">\n<h3 class=\"heading\">Must-read developer coverage<\/h3>\n<\/aside>\n<p>Fortunately, there are apps like Portainer that go out of their way to make managing and deploying containers exponentially easier than doing so from the command line. With Portainer, you can manage Docker containers, stacks, images, networks, volumes and more, but one of the most impressive features is its ability to deploy a full-stack application from a simple app template.<\/p>\n<p>You\u2019ll find templates for stacks like registries, NodeJS, NGINX, Apache, Caddy, MongoDB, Elasticsearch, SQL Server, Redis, Joomla, Drupal, Plane, Jenkins, Redmine, WordPress and others.<\/p>\n<p>Let me show you how it\u2019s done.<\/p>\n<p>Jump to:<\/p>\n<h2 id=\"need\">What you\u2019ll need to deploy a full-stack application<\/h2>\n<p>The only thing you\u2019ll need to follow along in this tutorial is a running instance of Portainer. I recommend deploying <a href=\"https:\/\/www.techrepublic.com\/article\/how-to-deploy-portainer-microk8s-environment\/\">Portainer to a MicroK8s environment<\/a> and then <a href=\"https:\/\/www.techrepublic.com\/article\/install-the-latest-version-of-the-docker-engine-to-avoid-vulnerabilities\/\">installing Docker CE<\/a> on the controller so you add a Docker environment into the mix.<\/p>\n<h2 id=\"deploy\">How to deploy a full-stack app from a Portainer template<\/h2>\n<p>Start by logging into your Portainer instance and selecting the Docker environment from the Environments listing (<strong>Figure A<\/strong>).<\/p>\n<p><strong>Figure A<\/strong><\/p>\n<figure id=\"attachment_4028649\" aria-describedby=\"caption-attachment-4028649\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-4028649\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2023\/01\/how-to-easily-deploy-a-full-stack-application-in-portainer-with-templates-1.jpg\" alt width=\"770\" height=\"306\"><figcaption id=\"caption-attachment-4028649\" class=\"wp-caption-text\">The two basic environments that are available to Portainer.<\/figcaption><\/figure>\n<p>Once the Docker environment is loaded, click App Templates in the left sidebar (<strong>Figure B<\/strong>).<\/p>\n<p><strong>Figure B<\/strong><\/p>\n<figure id=\"attachment_4028650\" aria-describedby=\"caption-attachment-4028650\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4028650\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2023\/01\/how-to-easily-deploy-a-full-stack-application-in-portainer-with-templates-2.jpg\" alt width=\"297\" height=\"434\"><figcaption id=\"caption-attachment-4028650\" class=\"wp-caption-text\">Our Docker environment navigation.<\/figcaption><\/figure>\n<p>A listing of the available application templates will appear. Let\u2019s test out the WordPress deployment. Scroll down until you see WordPress (<strong>Figure C<\/strong>).<\/p>\n<p><strong>Figure C<\/strong><\/p>\n<figure id=\"attachment_4028651\" aria-describedby=\"caption-attachment-4028651\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-4028651\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2023\/01\/how-to-easily-deploy-a-full-stack-application-in-portainer-with-templates-3.jpg\" alt width=\"770\" height=\"109\"><figcaption id=\"caption-attachment-4028651\" class=\"wp-caption-text\">The WordPress full-stack application template listing.<\/figcaption><\/figure>\n<p>From here, there are two ways to go. First, you can click the WordPress entry and deploy the full stack as is. Alternatively, you can click Copy As Custom, which will open the template up for editing (<strong>Figure D<\/strong>).<\/p>\n<p><strong>Figure D<\/strong><\/p>\n<figure id=\"attachment_4028652\" aria-describedby=\"caption-attachment-4028652\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-4028652\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2023\/01\/how-to-easily-deploy-a-full-stack-application-in-portainer-with-templates-4.jpg\" alt width=\"770\" height=\"765\"><figcaption id=\"caption-attachment-4028652\" class=\"wp-caption-text\">Opening the WordPress template as a custom deployment that you can then edit.<\/figcaption><\/figure>\n<p>Using the Custom option allows you to edit the YAML files in the Portainer Web Edibot so you can customize the deployment.<\/p>\n<p>If you simply want to get WordPress deployed quickly, just click the entry in the Templates listing and, in the resulting window (<strong>Figure E<\/strong>), give the deployment a name, type <code>wordpress<\/code> as the database root user password and click Deploy The Stack. If you want to change the password for heightened security, you\u2019ll want to go the custom route. For testing purposes, the simpler approach works fine.<\/p>\n<p><strong>Figure E<\/strong><\/p>\n<figure id=\"attachment_4028653\" aria-describedby=\"caption-attachment-4028653\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-4028653\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2023\/01\/how-to-easily-deploy-a-full-stack-application-in-portainer-with-templates-5.jpg\" alt width=\"770\" height=\"424\"><figcaption id=\"caption-attachment-4028653\" class=\"wp-caption-text\">Deploying the WordPress stack using the built-in template.<\/figcaption><\/figure>\n<p>It will take some time for the deployment to complete, but once it\u2019s finished, you will be taken back to the Stacks listing. Click on the newly deployed WordPress stack, and you\u2019ll see the published port listed (<strong>Figure F<\/strong>).<\/p>\n<p><strong>Figure F<\/strong><\/p>\n<figure id=\"attachment_4028654\" aria-describedby=\"caption-attachment-4028654\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-4028654\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2023\/01\/how-to-easily-deploy-a-full-stack-application-in-portainer-with-templates-6.jpg\" alt width=\"770\" height=\"471\"><figcaption id=\"caption-attachment-4028654\" class=\"wp-caption-text\">Our WordPress stack has been deployed.<\/figcaption><\/figure>\n<p>Give the containers plenty of time to spin up and then point your browser to http:\/\/SERVER:PORT, where SERVER is the IP address of the controller node and port is the published port you saw when you viewed the newly-deployed stack. You will be greeted by the WordPress installer (<strong>Figure G<\/strong>), where you can point and click your way to finishing the deployment.<\/p>\n<p><strong>Figure G<\/strong><\/p>\n<figure id=\"attachment_4028655\" aria-describedby=\"caption-attachment-4028655\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4028655\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2023\/01\/how-to-easily-deploy-a-full-stack-application-in-portainer-with-templates-7.jpg\" alt width=\"374\" height=\"917\"><figcaption id=\"caption-attachment-4028655\" class=\"wp-caption-text\">The WordPress installer wizard.<\/figcaption><\/figure>\n<h2 id=\"simple\">Full stacks made simple<\/h2>\n<p>You won\u2019t find an easier way to learn the art of deploying a full-stack application with Docker. Using Portainer greatly simplifies the deployment and management of containers. Once <a href=\"https:\/\/www.techrepublic.com\/resource-library\/whitepapers\/job-description-full-stack-developer\/\" target=\"_blank\" rel=\"noopener noreferrer\">full-stack developers<\/a> start using Portainer, they\u2019ll wonder how they ever managed without it.<\/p>\n<p><strong>Read next: <a href=\"https:\/\/www.techrepublic.com\/article\/best-ide-software\/\" target=\"_blank\" rel=\"noopener noreferrer\">The 12 best IDEs for programming<\/a> (TechRepublic)<\/strong><\/p>\n<p> <!-- default newsletter at the end --> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Deploying a complex Docker stack isn&#8217;t nearly as challenging as you think, at least when Portainer is your GUI of choice. Find out how easy this is with Portainer templates. Image: BalanceFormCreative\/Adobe Stock When you think of deploying a full-stack, containerized application, you probably expect it to be a tedious and complicated task of manually [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":86793,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,783,315,316,177,27],"tags":[],"class_list":["post-86792","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-cloudsync","category-containers","category-kubernetes","category-open-source","category-software"],"_links":{"self":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/posts\/86792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=86792"}],"version-history":[{"count":0,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/posts\/86792\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/media\/86793"}],"wp:attachment":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=86792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=86792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=86792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}