{"id":30951071,"url":"https://github.com/daleal/basic-rails-template","last_synced_at":"2026-04-10T13:31:53.724Z","repository":{"id":40187966,"uuid":"231720459","full_name":"daleal/basic-rails-template","owner":"daleal","description":"Basic Rails 6 template with academic purposes built with Docker and docker-compose to plug and play. For a more advanced template (docker-wise) visit https://github.com/daleal/rails-template","archived":false,"fork":false,"pushed_at":"2023-01-19T16:40:02.000Z","size":49,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-11T07:17:45.089Z","etag":null,"topics":["academic","docker","docker-compose","heroku","postgresql","rails"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daleal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-04T06:36:42.000Z","updated_at":"2020-08-31T19:21:40.000Z","dependencies_parsed_at":"2023-02-11T10:15:33.626Z","dependency_job_id":null,"html_url":"https://github.com/daleal/basic-rails-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daleal/basic-rails-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Fbasic-rails-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Fbasic-rails-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Fbasic-rails-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Fbasic-rails-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daleal","download_url":"https://codeload.github.com/daleal/basic-rails-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Fbasic-rails-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31645275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["academic","docker","docker-compose","heroku","postgresql","rails"],"created_at":"2025-09-11T05:27:50.243Z","updated_at":"2026-04-10T13:31:53.714Z","avatar_url":"https://github.com/daleal.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic Rails Template\n\nBasic Rails 6 template with academic purposes built with `Docker` and `docker-compose` to **_plug and play_**. For a more advanced template (_docker-wise_) visit [this repo](https://github.com/daleal/rails-template).\n\n## Running Locally\n\n### Requirements\n\nThe requirements for this template are simple:\n\n* `Docker`\n* `Docker Compose`\n\nAdditionally, to deploy to `heroku` you will need:\n\n* `Heroku`\n\n### Plug and Play\n\nThis repo comes with a `docker-compose.yml` file to handle using a `postgres` image pulled from the web and to use a `.env` file for environmental variables. As such, `compose` requires a `.env` file to function, so run:\n\n```sh\ncp .env.example .env\n```\n\nAfter that, configure the `.env` file as you please and `compose` is now ready to be used.\n\nTo get `on rails` quickly, build the image:\n\n```sh\ndocker-compose build\n```\n\nThen, create the database:\n\n```sh\ndocker-compose run web rails db:create\n```\n\nFinally, start the server:\n\n```sh\ndocker-compose up\n```\n\nFrom now on, every command regarding the app that should be run as `[COMMAND]` will now be run as `docker-compose run web [COMMAND]`. This includes database migrations (`docker-compose run web rails db:migrate`).\n\n### Caveats (or, may I say, Docker and Windows)\n\nIf you are using `Docker` on _Linux_ or `Docker` on _MacOS_, chances are your usage process has been almost flawless, and the instructions given in the tutorial worked at the first try. However, if you are using `Docker Toolbox` on Windows or `Docker for Windows` on Windows, things are different. Mainly, two things change:\n\n* Due to the technology being run inside a _Virtual Machine_, instead of finding your app in `localhost:3000`, your app will be defaulted to `192.168.99.100:3000` and will **not** be found in `localhost:3000`.\n* Due to the database volume being mounted to a _named volume_ created by the _Virtual Machine_, every Docker update **will** wipe your database clean. When using for development purposes, some simple seeds are enough to make this a _no-problem_. Keep an eye if that is your production environment, though, as data **will** be lost if you are not careful.\n\n### Docker Image\n\nThe image generated by `docker-compose build` with the original repo contains a standard Rails 6 app using `postgresql` as the database, `sass` as the stylesheet pre-processor and `puma` as the webserver.\n\n### When to Build\n\nThe command `docker-compose build` must be used only in 2 cases:\n\n1. Changes in the `Gemfile`: `docker-compose build` will notice if either the `Gemfile` or the `Gemfile.lock` present any changes. If so, it will re-run `bundle install` to update the image (this **will** take a while, so go make yourself a coffee. Also, _try_ to change the `Gemfile` as little as possible if you value your time at all)\n2. New `assets`: `docker-compose build` will notice if new assets need to be precompiled and will run `bundle exec rails assets:precompile` to update the image\n\nNotice that `Docker` is smart and if you run `docker-compose build` and the `Gemfile` has not changed and no new `assets` need to be precompiled, `Docker` will use cached layers to build the image, dramatically decreasing the amount of time wasted in your life (hopefully).\n\n## Heroku Deployment\n\nTo deploy to `heroku` using Container Registry, make sure to be logged in to the platform (`heroku login`). Then, log in to Container Registry:\n\n```sh\nheroku container:login\n```\n\nAfter that, create a new `heroku` app:\n\n```sh\nheroku create\n```\n\nDon't forget to add the `heroku-postgresql` addon to your `heroku` app (when deploying to `heroku`, only the Rails app will be deployed, and the `postgres` container used locally must be replaced with the `heroku-postgresql` addon):\n\n```sh\nheroku addons:create heroku-postgresql:hobby-dev\n```\n\nThis command will add the **free** basic `heroku-postgresql` addon to your app (you can upgrade this later if you desire).\n\nNext, build the image and push it to Container Registry:\n\n```sh\nheroku container:push web\n```\n\nFinally, release the image to your app:\n\n```sh\nheroku container:release web\n```\n\n**Important Note**: Once your app is created, to push new changes you only have to run `heroku container:push web` and then `heroku container:release web`.\n\nTo open the app in a browser, you can run `heroku open`. You can also access directly using the app's URL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaleal%2Fbasic-rails-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaleal%2Fbasic-rails-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaleal%2Fbasic-rails-template/lists"}