{"id":14955457,"url":"https://github.com/apsislabs/rails_starter","last_synced_at":"2025-10-05T23:05:30.072Z","repository":{"id":38296119,"uuid":"118197587","full_name":"apsislabs/rails_starter","owner":"apsislabs","description":"A starter environment for rails apps","archived":false,"fork":false,"pushed_at":"2025-01-13T20:29:29.000Z","size":243,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-13T21:30:21.478Z","etag":null,"topics":["rails","rails5","rails6","starter-project"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/apsislabs.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":"2018-01-20T01:32:51.000Z","updated_at":"2024-12-26T21:54:48.000Z","dependencies_parsed_at":"2023-01-28T20:00:45.608Z","dependency_job_id":"62371be8-2285-46ed-bade-43b56e4c5334","html_url":"https://github.com/apsislabs/rails_starter","commit_stats":{"total_commits":118,"total_committers":5,"mean_commits":23.6,"dds":0.3305084745762712,"last_synced_commit":"b04a77413e19f89d02f909c8ebf7bdcbee3ec9f4"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Frails_starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Frails_starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Frails_starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Frails_starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apsislabs","download_url":"https://codeload.github.com/apsislabs/rails_starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234737856,"owners_count":18879180,"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":["rails","rails5","rails6","starter-project"],"created_at":"2024-09-24T13:11:11.263Z","updated_at":"2025-09-30T13:30:56.424Z","avatar_url":"https://github.com/apsislabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\n## Getting Started\n\n1. `docker compose up -d`\n2. wait for it...\n3. visit `localhost:3000`\n4. rejoice!\n\n### Connection to the container\n\nYou can either run:\n\n```\n$ docker compose exec web sh\n```\n\nor\n\n```\n$ bin/ssh_to_container\n```\n\n### Renaming your app\n\nRenaming your app is super simple, first clone into its own folder. Then update the following:\n\n- `config/application.rb`\n  - change `RailsStarter` to `NewName`\n- `package.json`\n  - change `STARTER_REPLACE_NAME` to `new_name`\n\n### Changing Port\n\nBy default we have set this up to use port 3000, but as every rails app uses that port you may conflict with other projects. To update to port 5000 for example, change the following:\n\n- `compose.yml` - change `\"3000:3000\"` -\u003e `\"5000:3000\"`\n- `.env.development` - change `APP_PORT=3000` -\u003e `APP_PORT=5000`\n\n### Upgrading Rails\n\nWe try to keep the base repository up to date, but when you pull it's worth looking into whether you need to upgrade rails. A [guide can be found on the rails website](http://guides.rubyonrails.org/upgrading_ruby_on_rails.html).\n\nAs of Rails 5.1, the upgrade process should be as simple as:\n\n1. Update the `rails` gem in `Gemfile`\n2. Run `bundle install`\n3. Run `rails app:update` for an interactive upgrade\n\n### Configuring Gems\n\nThere are a number of gems that need configuration to work:\n\n- Configure [`simple_form`](https://github.com/plataformatec/simple_form)\n- Ensure columns for [`discard`](https://github.com/jhawthorn/discard)\n\n### Code Formatting\n\nThis starter uses [`standard-rb`](https://github.com/standardrb/standard) for Ruby code formatting and linting. We have moved away from prettier in favor of standard-rb conventions.\n\nTo format your code, run:\n\n```bash\nbundle exec standardrb --fix\n```\n\nTo check your code without fixing, run:\n\n```bash\nbundle exec standardrb\n```\n\nThe configuration can be found in `.rubocop.yml`.\n\n### Enabling Assets\n\nBy default, this repo comes set up to run [`vite_rails`](https://vite-ruby.netlify.app/), along with React and Stimulus. This is our recommended setup for a monolith, where you plan to build the frontend as part of your Rails app.\n\nTo enable assets, you'll need to uncomment the `vite` container in `compose.yml`, along with the `vite` environment variables and volumes. This will start the asset building container along with the rest of the application, will place built assets from the `frontend` directory into `public`.\n\nTo actually _see_ these assets, you'll need to uncomment the `vite_*_tag` entries in `app/views/layouts/application.html.erb`. Once that's done, you should have hot reloading of CSS \u0026 JS, along with automatic refresh when a Rails view changes.\n\n### Disabling Assets\n\nWhile the assets build and inclusion is disabled by default, if you plan to use a _different_ mechanism for building your assets (a different builder, an external client, etc.), you may want to remove all the `vite` stuff we've set up for you.\n\nIf that's the case, you'll want to delete all of the following:\n\n1. `vite_*_tag` entries from `app/views/layouts/application.html.erb`\n2. `config/vite.js`\n3. `vite.config.js`\n4. `bin/vite`\n5. `docker/start_assets.sh`\n6. `vite_rails` from `Gemfile`\n7. References to `vite` in `config/initializers/content_security_policy.rb`\n8. Optionally, `package.json` and `package-lock.json` \u0026 `node_modules`\n9. Optionally, the entire `frontend/` directory\n\n### Recommended Reading\n\n- http://www.betterspecs.org/\n- https://github.com/ankane/production_rails\n- https://github.com/ankane/secure_rails\n- https://robots.thoughtbot.com/its-about-time-zones\n\n## The Containers\n\nIf you look in `compose.yml`  and `compose.override.yml` (local) you'll notice that we've spun up a number of containers, not all of which may be useful for your project.\n\n1. **web**: Your core container which runs the `rails` server process.\n2. **worker**: A duplicate of your core app, but running `solid_queue` instead. [Disabled by Default as it runs in the puma process]\n3. **vite**: A duplicate of your core app, but running `vite_rails` instead.\n4. **postgres**: Your application's database.\n5. **mailhog**: Mail catcher for preventing outbound emails from escaping.\n\nTo cleanup all containers, volumes and networks execute `docker compose down -v`\n\n## Deployment\n\nThis starter is set up to deploy out of the box on dokploy using a compose configuration. There are some items that need to be set up properly:\n\n1. Configure the environment variables. You can find samples in `.env.dokploy.example`\n2. Make sure you configure a domain\n3. Make sure you turn on **Enable Isolated Deployment** in the **Advanced** tab of your deployment\n\n---\n\n# Built by Apsis\n\n[![apsis](https://s3-us-west-2.amazonaws.com/apsiscdn/apsis.png)](https://www.apsis.io)\n\n`rails_starter` was built by Apsis Labs. We love sharing what we build! Check out our [other libraries on Github](https://github.com/apsislabs), and if you like our work you can [hire us](https://www.apsis.io/work-with-us/) to build your vision.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsislabs%2Frails_starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapsislabs%2Frails_starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsislabs%2Frails_starter/lists"}