{"id":15712463,"url":"https://github.com/jigarius/docker-rails-example","last_synced_at":"2025-04-20T17:33:44.045Z","repository":{"id":180213320,"uuid":"319458747","full_name":"jigarius/docker-rails-example","owner":"jigarius","description":"Example of using Ruby on Rails with docker compose.","archived":false,"fork":false,"pushed_at":"2022-08-23T21:00:17.000Z","size":30,"stargazers_count":23,"open_issues_count":0,"forks_count":20,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T03:41:27.176Z","etag":null,"topics":["docker","docker-compose","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/jigarius.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},"funding":{"custom":["https://www.paypal.me/jigarius"]}},"created_at":"2020-12-07T22:18:10.000Z","updated_at":"2024-08-02T15:49:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6fb279b-4a38-41f4-8eb3-4f98c4f308c3","html_url":"https://github.com/jigarius/docker-rails-example","commit_stats":null,"previous_names":["jigarius/docker-rails-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jigarius%2Fdocker-rails-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jigarius%2Fdocker-rails-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jigarius%2Fdocker-rails-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jigarius%2Fdocker-rails-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jigarius","download_url":"https://codeload.github.com/jigarius/docker-rails-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249933626,"owners_count":21347711,"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":["docker","docker-compose","rails","ruby"],"created_at":"2024-10-03T21:16:18.100Z","updated_at":"2025-04-20T17:33:43.841Z","avatar_url":"https://github.com/jigarius.png","language":"Dockerfile","readme":"# Docker Compose: Ruby on Rails Example\n\nA simple example of using Docker Compose for developing and deploying\nRuby on Rails applications.\n\nRead the full article on [jigarius.com](https://jigarius.com/blog/ruby-on-rails-with-docker-compose).\n\n## Getting started\n\nFollow the steps mentioned under _existing app_ or _new app_ depending on your\nsituation. That will ensure that the `ror` directory is in order. After that,\nfollow these steps:\n\n  * Destroy any existing containers with conflicting names.\n  * Copy `.env.example` to `.env` and modify (if required).\n  * Create `config/database.yml` based on `.docker/ror/example.database.yml`.\n  * Build an image for Ruby on Rails:\n    ```\n    docker-compose build\n    ```\n  * Boot up the app by running:\n    ```\n    docker-compose up\n    ```\n  * Create databases by running:\n    ```\n      docker-compose exec web rake db:create\n    ```\n\nCool! Now your Rails app should be available at\n[localhost:3000](http://localhost:3000).\n\n### Existing app\n\n  * Delete the contents of the `ror` directory.\n  * Put the files of your existing Rails app in the `ror` directory.\n    * The `Gemfile` should be at `ror/Gemfile`.\n\n### New app\n\nIf you want to start with a Rails app from scratch,\n\n  * Create the following files:\n    * `Gemfile`: You can base this on `.docker/ror/example.Gemfile`.\n    * `Gemfile.lock`: An empty file.\n  * Run the following command to install Rails. You can modify the params for\n    the `rails new` command as needed.\n    ```\n    docker-compose run --no-deps web rails new . --force --database=postgresql\n    ```\n    * For a quick Rails install, use the `--minimal` flag.\n\n## Commands\n\nHere are some helpful commands.\n\n  * `docker-compose start`: Starts app containers.\n  * `docker-compose stop`: Stops app containers.\n  * `rake -T`: For some other helpful commands.\n\nSee [docker compose docs](https://docs.docker.com/compose/) for further info on\nDocker Compose.\n","funding_links":["https://www.paypal.me/jigarius"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjigarius%2Fdocker-rails-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjigarius%2Fdocker-rails-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjigarius%2Fdocker-rails-example/lists"}