{"id":20181914,"url":"https://github.com/devteds/e6-deploy-on-aws","last_synced_at":"2025-04-10T05:10:33.416Z","repository":{"id":132073124,"uuid":"84526628","full_name":"devteds/e6-deploy-on-aws","owner":"devteds","description":"Code examples for the episode #6 - https://devteds.com/episodes/6-deploy-dockerized-web-api-application-on-amazon-ec2-with-rds","archived":false,"fork":false,"pushed_at":"2017-03-10T06:50:50.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T06:22:19.039Z","etag":null,"topics":["cloud","digitalocean","docker","docker-compose","docker-on-cloud","mysql","rails-on-docker","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devteds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-10T06:23:15.000Z","updated_at":"2020-09-14T13:53:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"0dfc7ba6-1d7d-41f7-807b-3dfa6d25fa7c","html_url":"https://github.com/devteds/e6-deploy-on-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fe6-deploy-on-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fe6-deploy-on-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fe6-deploy-on-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fe6-deploy-on-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devteds","download_url":"https://codeload.github.com/devteds/e6-deploy-on-aws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161274,"owners_count":21057555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","digitalocean","docker","docker-compose","docker-on-cloud","mysql","rails-on-docker","ruby","ruby-on-rails"],"created_at":"2024-11-14T02:37:08.388Z","updated_at":"2025-04-10T05:10:33.408Z","avatar_url":"https://github.com/devteds.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nDevteds [Episode #6](https://devteds.com/episodes/6-deploy-dockerized-web-api-application-on-amazon-ec2-with-rds)\n\nSingle-node deployment of a containerized API application on Amazon EC2 with database on RDS \n(Amazon Relational Database Service) using docker machine and docker compose.\n\n[Episode video link](https://youtu.be/bU9o2fVreRU)\n\n[![Episode Video Link](https://i.ytimg.com/vi/bU9o2fVreRU/hqdefault.jpg)](https://youtu.be/bU9o2fVreRU)\n\n## Tested on\n\n* macOS - 10.12\n* Docker - 1.13.0\n* Docker compose - 1.10.0\n* Docker machine - 0.9.0\n\n## Run this application on local\n\n```\ngit clone https://github.com/devteds/e6-deploy-on-aws.git deploy-on-aws\ncd deploy-on-aws\n# edit local.yml for local testing env\ndocker-compose -f local.yml up\n# on a separate terminal window\ndocker-compose -f local.yml run --rm app rails db:migrate\ndocker-compose -f local.yml run --rm app rails db:seed\n# Use REST client or curl to browse the APIs\ncurl http://localhost:3007/posts\n```\n\n## Deploy on Amazon\n\nFollow the instructions from the video. Below are the highlights,\n\n- Spin up RDS on AWS \n- Edit staging.yml for the database configs and endpoint\n- Create a new user using AWS IAM\n- Install AWS CLI, if not installed already\n\n```\naws configure\ndocker-machine create -d amazonec2 --amazonec2-region=\u003cREGION FROM AWS\u003e node1\ndocker-machine ls\neval $(docker-machine env node1)\n\n# enter the API key id and secret for the user created on IAM\ndocker-compose -f staging.yml run --rm app rails db:migrate\ndocker-compose -f staging.yml run --rm app rails db:seed\ndocker-compose -f staging.yml up -d\n\n# Use REST client or curl to browse the APIs\ncurl http://$(docker-machine ip node1)/posts\n\ndocker-compose -f staging.yml ps\ndocker-compose -f staging.yml stop\ndocker-compose -f staging.yml start\ndocker-compose -f staging.yml logs\n```\n\n# Application source code\n\nSource code used in [episode 6](https://devteds.com/episodes/6-deploy-dockerized-web-api-application-on-amazon-ec2-with-rds) \nis from [episode 5](https://devteds.com/episodes/5-deploy-with-docker-single-node-deployment-of-rails-api-application-on-vps)\n\n- Source code: https://github.com/devteds/e5-deploy-with-docker-rails-api-single-node\n- Docker image: https://hub.docker.com/r/devteds/rails-api-example/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevteds%2Fe6-deploy-on-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevteds%2Fe6-deploy-on-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevteds%2Fe6-deploy-on-aws/lists"}