How we moved from Heroku to AWS using Docker
Описание и применение
Перенос Ruby on Rails приложения с Heroku на AWS с использованием Docker снизил ежемесячные расходы примерно на 30 % и предоставил полный контроль над инфраструктурой.
Задача
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.
Результат
The migration reduced monthly hosting costs by ~30%, improved deployment speed, and provided full control over the runtime environment.
Рабочий процесс
- 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.
Доказательства
We started by containerizing our Rails app with Docker, creating a Dockerfile and docker-compose.yml to replicate the Heroku environment locally.
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.
- Дата записи: 2026-09-15T11:31:09.866Z