{"id":28323886,"url":"https://github.com/zeropsio/recipe-rails","last_synced_at":"2026-04-27T08:32:01.058Z","repository":{"id":287394208,"uuid":"843770270","full_name":"zeropsio/recipe-rails","owner":"zeropsio","description":"Ruby on Rails on Zerops :)","archived":false,"fork":false,"pushed_at":"2025-05-07T23:13:25.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-01T13:40:48.508Z","etag":null,"topics":["paas","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":false,"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/zeropsio.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,"zenodo":null}},"created_at":"2024-08-17T11:16:06.000Z","updated_at":"2025-05-07T23:13:29.000Z","dependencies_parsed_at":"2025-04-11T14:35:18.859Z","dependency_job_id":"3c2c30d7-d3bb-4214-a6c5-3370c314b9c8","html_url":"https://github.com/zeropsio/recipe-rails","commit_stats":null,"previous_names":["zeropsio/recipe-rails"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zeropsio/recipe-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeropsio","download_url":"https://codeload.github.com/zeropsio/recipe-rails/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["paas","ruby","ruby-on-rails"],"created_at":"2025-05-25T16:15:14.110Z","updated_at":"2026-04-27T08:32:01.025Z","avatar_url":"https://github.com/zeropsio.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zerops x Ruby on Rails \n\nA basic [Ruby on Rails](https://rubyonrails.org/) 8 application running on Zerops, utilizing PostgreSQL for database. Perfect starting point for your Rails projects with a simple posts feature.\n\n![rails](https://github.com/zeropsio/recipe-shared-assets/blob/main/covers/svg/cover-ror.svg)\n\n\u003cbr/\u003e\n\n## Deploy on Zerops\nYou can either click the deploy button to deploy directly on Zerops, or manually copy the import yaml to the import dialog in the Zerops app.\n\n[![Deploy on Zerops](https://github.com/zeropsio/recipe-shared-assets/blob/main/deploy-button/green/deploy-button.svg)](https://app.zerops.io/recipe/rails)\n\n\u003cbr/\u003e\n\n## Recipe features\n\n- Rails running on a load balanced **Zerops Ruby** service\n- Zerops **PostgreSQL 16** service as database\n- Configuration for Rails **database migrations** and **seed data**\n- Pre-built assets in build phase\n- Environment-specific configurations for development, testing, and production\n- Logs accessible through Zerops GUI\n- Utilization of Zerops built-in **environment variables** system for database configuration\n\n\u003cbr/\u003e\n\n## Application features\n\n- Simple Post model with title and content fields\n- Ability to create new posts through a form\n- Listing all posts on the index page\n- Basic validations for post data\n- Seed data for initial posts\n\n\u003cbr/\u003e\n\n## Production vs. development\n\nBase of the recipe is ready for production, the difference comes down to:\n\n- Use highly available version of the PostgreSQL database (change `mode` from `NON_HA` to `HA` in recipe YAML, `db` service section)\n- Use at least two containers for Rails service to achieve high reliability and resilience (add `minContainers: 2` in recipe YAML, `app` service section)\n\n\u003cbr/\u003e\n\n## Changes made over the default installation\n\nIf you want to modify your existing Rails app to efficiently run on Zerops, these are the general steps we took:\n\n- [ ] Add `zerops.yml` to your repository, our example includes database migrations and seed data\n- [ ] Configure the database to use environment variables in `config/database.yml`:\n  ```yaml\n  default: \u0026default\n    adapter: postgresql\n    encoding: unicode\n    pool: \u003c%= ENV.fetch(\"RAILS_MAX_THREADS\") { 5 } %\u003e\n    host: \u003c%= ENV.fetch(\"DATABASE_HOST\") { \"localhost\" } %\u003e\n    username: \u003c%= ENV.fetch(\"DATABASE_USERNAME\", nil) %\u003e\n    password: \u003c%= ENV.fetch(\"DATABASE_PASSWORD\", nil) %\u003e\n    port: \u003c%= ENV.fetch(\"DATABASE_PORT\") { 5432 } %\u003e\n  ```\n- [ ] Configure appropriate headers for reverse proxy load balancer\n\n\u003cbr/\u003e\n\n## Local development\n\n1. Clone this repository\n2. Install Ruby 3.4.x and Rails 8.x\n3. Install PostgreSQL\n4. Set up environment variables for database connection\n5. Run:\n   ```bash\n   bundle install\n   bin/rails db:migrate db:seed\n   bin/rails server\n   ```\n6. Visit http://localhost:3000 to see your posts application\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\nNeed help setting your project up? Join [Zerops Discord community](https://discord.com/invite/WDvCZ54).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeropsio%2Frecipe-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-rails/lists"}