{"id":3168,"date":"2019-03-24T08:53:36","date_gmt":"2019-03-24T08:53:36","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/deploying-rails-app-with-amazon-ecs\/"},"modified":"2026-04-24T11:29:45","modified_gmt":"2026-04-24T11:29:45","slug":"nasazeni-aplikace-rails-pomoci-amazon-ecs","status":"publish","type":"post","link":"https:\/\/thecodest.co\/cs\/blog\/deploying-rails-app-with-amazon-ecs\/","title":{"rendered":"Nasazen\u00ed aplikace Rails pomoc\u00ed slu\u017eby Amazon ECS"},"content":{"rendered":"\n<p>Let\u2019s create it by running <code><a href=\"https:\/\/thecodest.co\/cs\/blog\/ways-to-increase-your-rails-performance\/\">rails<\/a> new sample-rails-app<\/code>, then generating a basic controller action <code>rails g controller Welcome index<\/code> and setting routes to the root path as a `root to: welcome#index\u201d.<\/p>\n\n\n\n<p>Our goal is to see this welcome page deployed using ECS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create a repository with Amazon Elastic Container Registry (ECR)<\/h2>\n\n\n\n<p><b>Amazon ECR<\/b> is a container registry. We will be using it to store our app\u2019s images and pull them from it so that they run on ECS.<\/p>\n\n\n\n<p>Go to your <b><a href=\"https:\/\/thecodest.co\/cs\/case-studies\/how-the-codest-helped-bright-launch-a-scalable-edtech-platform\/\">AWS<\/a> panel<\/b>, look for <b>Elastic Container<br>Registry<\/b> and click <b>Get Started<\/b>. You\u2019ll see the below screen:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/1.png\" alt=\"repository with Amazon Elastic Container Registry\" title=\"Create a repository with Amazon Elastic Container Registry\"\/><\/figure>\n\n\n\n<p>We will create a private repository and name it&nbsp;<em>sample-rails-app.<\/em><\/p>\n\n\n\n<p>The repository is there, but it\u2019s empty. We want it to contain our app\u2019s image. This is the next step.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"># throw errors if Gemfile has been modified since Gemfile.lock\n\nRUN bundle config --global frozen 1\n\nWORKDIR \/app\n\nCOPY Gemfile Gemfile.lock .\/\n\nRUN bundle install\n\nCOPY . .\n\nCMD [\"rails\", \"server\", \"-b\", \"0.0.0.0\"]<\/code><\/pre>\n\n\n\n<p>Then we should build an image and push it to the ECR repository.<\/p>\n\n\n\n<p>Before that, let\u2019s precompile assets with `rails assets:precompile`.<\/p>\n\n\n\n<p>Now, go to the created repository. At the top of the screen, you\u2019ll see a&nbsp;<em>View push commands<\/em>&nbsp;button with details on how to do this.<\/p>\n\n\n\n<p>In my case (Linux), I run it with these AWS instructions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">aws ecr get-login-password --region eu-central-1 | <a href=\"https:\/\/thecodest.co\/cs\/dictionary\/docker-developer\/\">docker<\/a> login --username AWS --password-stdin 212516879399.dkr.ecr.eu-central-1.amazonaws.com\n\ndocker build -t sample-rails-app .\n\ndocker tag sample-rails-app:latest 212516879399.dkr.ecr.eu-central-1.amazonaws.com\/sample-rails-app:latest\n\ndocker push 212516879399.dkr.ecr.eu-central-1.amazonaws.com\/sample-rails-app:latest<\/code><\/pre>\n\n\n\n<p>Make sure that your user is permitted to do this operation. I added\u00a0AmazonElasticContainerRegistryPowerUser\u00a0policy to my user, which looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ecr:GetRegistryPolicy\",\n                \"ecr:DescribeRegistry\",\n                \"ecr:GetAuthorizationToken\",\n                \"ecr:DeleteRegistryPolicy\",\n                \"ecr:PutRegistryPolicy\",\n                \"ecr:PutReplicationConfiguration\"\n            ],\n            \"Resource\": \"*\"\n        },\n        {\n            \"Sid\": \"VisualEditor1\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"ecr:*\",\n            \"Resource\": \"arn:aws:ecr:*:212516879399:repository\/*\"\n        }\n    ]\n}<\/code><\/pre>\n\n\n\n<p>We have our docker image prepared.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating the Application Load Balancer<\/h2>\n\n\n\n<p>I want the outside world to be able to connect only to my Application Load Balancer. It will pass traffic to containers that are running inside our ECS cluster.<\/p>\n\n\n\n<p>Go to&nbsp;<em>EC2 services<\/em>&nbsp;-&gt;&nbsp;<em>Load Balancing<\/em>&nbsp;-&gt;&nbsp;<em>Load Balancers<\/em>, click&nbsp;<em>Create Load Balancer<\/em>, select&nbsp;<em>Application&nbsp;Load Balancer<\/em>&nbsp;and click the&nbsp;<em>Create<\/em>&nbsp;button.<\/p>\n\n\n\n<p>Set its name to&nbsp;<em>sample-rails-app-alb<\/em>, use your default VPC and select all its subnets.<\/p>\n\n\n\n<p>We\u2019re left with&nbsp;<em>Security Groups<\/em>&nbsp;and&nbsp;<em>Listeners and routing<\/em>&nbsp;sections.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Security Groups<\/h3>\n\n\n\n<p>We will create a new security group for our load balancer. It works like a firewall; we will set the rules for inbound and outbound traffic. We want to accept inbound http traffic (TCP port 80) and allow all outbound traffic.&nbsp;<\/p>\n\n\n\n<p>To do this, click on the \u201c<em>Create new security group<\/em>\u201d link.<\/p>\n\n\n\n<p>In the section \u201c<em>Basic details<\/em>\u201d, set name and description, leave the default VPC.<\/p>\n\n\n\n<p>In my case \u2013 name: \u201c<em>sample-rails-app-alb-sg<\/em>\u201d, description: \u201c<em>http from outside, all from inside<\/em>\u201d<\/p>\n\n\n\n<p>Add the inbound rule with Type:&nbsp;<em>HTTP<\/em>&nbsp;and Source:&nbsp;<em>Anywhere-IPv4<\/em>. Leave outbound rules as they are.<\/p>\n\n\n\n<p>Click&nbsp;<em>create security group<\/em>, then go back to the tab where you were creating the Application Load Balancer, refresh security groups and add the one we\u2019ve just created, remove the default one.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Listeners and routing<\/h3>\n\n\n\n<p>In this section, we will define to where we want the load balancer to pass traffic. Leave&nbsp;<em>Listener<\/em>&nbsp;<em>Protocol<\/em>&nbsp;and&nbsp;<em>Port<\/em>&nbsp;as HTTP and 80, as this is exactly what we want, and click \u201c<em>Create target group<\/em>\u201d link.<\/p>\n\n\n\n<p>Set the name to \u201c<em>sample-rails-app-alb-tg<\/em>\u201d. The only change is the Port number. We will be passing it to port 3000 as this is the one for our Rails app. Ignore the next step (<em>Registered targets)<\/em>&nbsp;and create the target group.<\/p>\n\n\n\n<p>Now go back to the tab where we were creating the Application Load Balancer, refresh the target group and select the one we\u2019ve just created.<\/p>\n\n\n\n<p>We have our Application Load Balancer ready, now let\u2019s play with ECS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating an ECS Cluster<\/h2>\n\n\n\n<p>There is a lot of scary terms you\u2019re going to see \u2013 cluster, tasks, tasks definition, services. To make it simpler, think about the cluster as a group of servers (EC2 instances). On each one, we run tasks, which are just a group of containers running together. Task definition describes which containers are in a given group and which resources we would like to give them (memory, cpu). Services keep an eye on these tasks to make sure that there is always correct number of healthy tasks running in our cluster.<\/p>\n\n\n\n<p>With this in mind, let\u2019s create our cluster.<\/p>\n\n\n\n<p>Go to the ECS page and click on the&nbsp;<em>Clusters<\/em>&nbsp;link and&nbsp;<em>Create Cluster<\/em>&nbsp;button. Choose the \u201c<em>EC2 + Linux Networking<\/em>\u201d one and click&nbsp;<em>Next Step<\/em>.&nbsp;<\/p>\n\n\n\n<p>Set the cluster name to \u201c<em>sample-rails-app-cluster<\/em>\u201d. Choose the EC2 instance type, I took the t2-micro one as it\u2019s available within the Free Tier plan. Leave the number of instances as 1.&nbsp;<\/p>\n\n\n\n<p>In the networking section, use your default VPC and select all its subnets. Click create, wait a little bit and voila, we have a new ECS Cluster created.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Task Definition<\/h2>\n\n\n\n<p>Click on the&nbsp;<em>Task Definitions<\/em>&nbsp;link, then&nbsp;<em>Create new Task Definition<\/em>&nbsp;button. Select the&nbsp;<em>EC2<\/em>&nbsp;option and click&nbsp;<em>Next Step<\/em>. The app that we\u2019re going to run is very simple, so we need only a few options here.&nbsp;<\/p>\n\n\n\n<p>Set&nbsp;<em>Task Definition<\/em>&nbsp;name to \u201c<em>sample-rails-app<\/em>\u201d, then go straight to the&nbsp;<em>Container definitions<\/em>&nbsp;section and click \u201c<em>Add container<\/em>\u201d. Name the Container as \u201c<em>sample-rails-app<\/em>\u201d, and set image location in the format \u201c<em>repository-url\/image:tag<\/em>\u201d. In the new browser tab, go to the ECR to copy the image URI. In my case, it was: \u201c<em>212516879399.dkr.ecr.eu-central-1.amazonaws.com\/sample-rails-app:latest<\/em>\u201d.<\/p>\n\n\n\n<p>Set your Memory Limit to the recommended 300-500MiB. Now, the most tricky thing \u2013 Port Mapping.<\/p>\n\n\n\n<p>Our app runs inside a container on port 3000. So put 3000 as the container port. We will enter 0 as a host port,&nbsp;which basically means that it selects a random port. Fortunately, our Application Load Balancer will know this port mapping and will be able to direct traffic correctly. We can even run multiple tasks on this single instance.&nbsp;<\/p>\n\n\n\n<p>Add the environment variable&nbsp;<em>RAILS_ENV<\/em>&nbsp;and set it to&nbsp;<em>production<\/em>.<\/p>\n\n\n\n<p>Now click&nbsp;<em>Add<\/em>&nbsp;to add our container definition and click&nbsp;<em>Create<\/em>&nbsp;to finish Task Definition setup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Service<\/h2>\n\n\n\n<p>We have our cluster, load balancer and task definition. Now we have to somehow run these tasks inside our cluster. This is the job of services. Go to the newly created cluster, select the&nbsp;<em>Services<\/em>&nbsp;tab and click on the&nbsp;<em>Create<\/em>&nbsp;button.&nbsp;<\/p>\n\n\n\n<p>Set the Launch type to EC2, add name \u201c<em>sample-rails-app-service<\/em>\u201d. Set the number of tasks to 1 and click&nbsp;<em>Next Step<\/em>. On this page, select the Application Load Balancer radio button and choose the existing IAM role for it. In the \u201cContainer to load balance\u201d section, you should have already entered a correct container \u201csample-rails-app:0:3000\u201d, then click \u201cAdd to load balancer.\u201d<\/p>\n\n\n\n<p>For \u201cProduction listener port\u201d, choose 80:HTTP; as the Target group name, use the one we created before \u2013 \u201c<em>sample-rails-app-alb-tg<\/em>\u201d and click&nbsp;<em>Next Step<\/em>. Leave&nbsp;<em>Auto Scaling<\/em>&nbsp;options as they are, click&nbsp;<em>Next Step<\/em>&nbsp;and&nbsp;<em>Create Service<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Update the ECS Security Group<\/h2>\n\n\n\n<p>You can go to created cluster page and check the&nbsp;<em>Tasks<\/em>&nbsp;tabs, there should be one task running. The Service has started it. Now go to EC2 service page, click Load Balancers and see our Application Load Balancer\u2019s details. You should have there its DNS name. Copy it and open in the browser. It should direct you to our app. Unfortunately, we get the \u201c<em>504 gateway time-out<\/em>\u201d error.&nbsp;<\/p>\n\n\n\n<p>The problem is in the security group of our cluster. Its inbound rules do not allow traffic incoming from the load balancer. To fix it, go back to the EC2 panel and click on the&nbsp;<em>Security Groups<\/em>&nbsp;link. There is a new group that was created during the cluster creation process. It should have the name starting with \u201c<em>EC2ContainerService-sample-rails-app-cluster<\/em>\u201d. Click on it and edit the inbound rules. As we want to allow any traffic from our VPC, go to the Amazon VPC panel and check what\u2019s your VPC IPv4 CIDR. Set the rule type to \u201c<em>All traffic<\/em>\u201d and the source to IPv4 CIDR. Save this rule and try to load the balancer\u2019s DNS name.&nbsp;<\/p>\n\n\n\n<p>Hopefully, you see just as I do \ud83d\ude42<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/2.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>Read More<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/graphql-ruby-what-about-performance\">GraphQL Ruby. What about performance?<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/rails-and-other-means-of-transport\">Rails and Other Means of Transport<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/rails-development-with-tmux-vim-fzf-ripgrep\">Rails Development with TMUX, Vim, Fzf + Ripgrep<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>V tomto n\u00e1vodu bych v\u00e1m r\u00e1d uk\u00e1zal, jak nasadit uk\u00e1zkovou aplikaci Rails pomoc\u00ed slu\u017eby Amazon Elastic Container Service (ECS).<\/p>","protected":false},"author":2,"featured_media":3169,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Deploying Rails app with Amazon ECS - The Codest<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/cs\/blog\/nasazeni-aplikace-rails-pomoci-amazon-ecs\/\" \/>\n<meta property=\"og:locale\" content=\"cs_CZ\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deploying Rails app with Amazon ECS\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, I\u2019d like to show you how to deploy a sample Rails app using the Amazon Elastic Container Service (ECS).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/cs\/blog\/nasazeni-aplikace-rails-pomoci-amazon-ecs\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-24T08:53:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-24T11:29:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby-on-rails-amazon.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"Deploying Rails app with Amazon ECS\",\"datePublished\":\"2019-03-24T08:53:36+00:00\",\"dateModified\":\"2026-04-24T11:29:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/\"},\"wordCount\":1368,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby-on-rails-amazon.png\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"cs\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/\",\"name\":\"Deploying Rails app with Amazon ECS - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby-on-rails-amazon.png\",\"datePublished\":\"2019-03-24T08:53:36+00:00\",\"dateModified\":\"2026-04-24T11:29:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/#breadcrumb\"},\"inLanguage\":\"cs\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby-on-rails-amazon.png\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby-on-rails-amazon.png\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/deploying-rails-app-with-amazon-ecs\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deploying Rails app with Amazon ECS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"cs\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/cs\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Nasazen\u00ed aplikace Rails pomoc\u00ed Amazon ECS - The Codest","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/cs\/blog\/nasazeni-aplikace-rails-pomoci-amazon-ecs\/","og_locale":"cs_CZ","og_type":"article","og_title":"Deploying Rails app with Amazon ECS","og_description":"In this tutorial, I\u2019d like to show you how to deploy a sample Rails app using the Amazon Elastic Container Service (ECS).","og_url":"https:\/\/thecodest.co\/cs\/blog\/nasazeni-aplikace-rails-pomoci-amazon-ecs\/","og_site_name":"The Codest","article_published_time":"2019-03-24T08:53:36+00:00","article_modified_time":"2026-04-24T11:29:45+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby-on-rails-amazon.png","type":"image\/png"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"7 minut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"Deploying Rails app with Amazon ECS","datePublished":"2019-03-24T08:53:36+00:00","dateModified":"2026-04-24T11:29:45+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/"},"wordCount":1368,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby-on-rails-amazon.png","articleSection":["Software Development"],"inLanguage":"cs","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/","url":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/","name":"Nasazen\u00ed aplikace Rails pomoc\u00ed Amazon ECS - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby-on-rails-amazon.png","datePublished":"2019-03-24T08:53:36+00:00","dateModified":"2026-04-24T11:29:45+00:00","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/#breadcrumb"},"inLanguage":"cs","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/"]}]},{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby-on-rails-amazon.png","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby-on-rails-amazon.png","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/deploying-rails-app-with-amazon-ecs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"Deploying Rails app with Amazon ECS"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"cs"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/cs\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/comments?post=3168"}],"version-history":[{"count":7,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3168\/revisions"}],"predecessor-version":[{"id":7782,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3168\/revisions\/7782"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/media\/3169"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/media?parent=3168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/categories?post=3168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/tags?post=3168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}