Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How we moved from Heroku to AWS using Docker

Description and use

Migrating a Ruby on Rails app from Heroku to AWS using Docker cut monthly costs by ~30% and gave full infrastructure control.

Problem

The team needed to migrate a Ruby on Rails application from Heroku to AWS to gain more control over infrastructure, reduce costs, and improve scalability.

Outcome

The migration reduced monthly hosting costs by ~30%, improved deployment speed, and provided full control over the runtime environment.

Workflow

  • 1. Containerized the Rails app using Docker, creating a Dockerfile and docker-compose.yml.
  • 2. Set up a local Docker environment to test the container.
  • 3. Created an AWS account and configured IAM roles for deployment.
  • 4. Migrated the PostgreSQL database to Amazon RDS and the Redis cache to ElastiCache.
  • 5. Configured environment variables and secrets in AWS Parameter Store.
  • 6. Deployed the Docker image to AWS Elastic Beanstalk using the Docker platform.
  • 7. Set up load balancing and auto‑scaling groups.
  • 8. Tested the application in staging, then switched traffic to production.
  • 9. Decommissioned Heroku resources and monitored performance and cost on AWS.

Evidence

We started by containerizing our Rails app with Docker, creating a Dockerfile and docker-compose.yml to replicate the Heroku environment locally.

Source

After setting up the Docker image, we deployed it to AWS Elastic Beanstalk using the Docker platform, which handled load balancing and auto‑scaling for us.

Source

  • Record date: 2026-09-15T11:31:09.866Z