{"id":13840545,"url":"https://github.com/CleverCloud/rails-postgresql-example","last_synced_at":"2025-07-11T09:32:07.130Z","repository":{"id":118441627,"uuid":"96418645","full_name":"CleverCloud/rails-postgresql-example","owner":"CleverCloud","description":"Run Ruby on Rails with PostgreSQL on Clever Cloud","archived":true,"fork":false,"pushed_at":"2019-03-15T17:15:15.000Z","size":37,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-08-04T17:08:45.923Z","etag":null,"topics":["clevercloud-example","postgresql","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","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/CleverCloud.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}},"created_at":"2017-07-06T10:28:03.000Z","updated_at":"2024-08-04T17:08:45.924Z","dependencies_parsed_at":null,"dependency_job_id":"897242d1-3419-44e7-8743-5848f54cace7","html_url":"https://github.com/CleverCloud/rails-postgresql-example","commit_stats":null,"previous_names":["clevercloud/demo-rubyonrails-pg-rest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleverCloud%2Frails-postgresql-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleverCloud%2Frails-postgresql-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleverCloud%2Frails-postgresql-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleverCloud%2Frails-postgresql-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CleverCloud","download_url":"https://codeload.github.com/CleverCloud/rails-postgresql-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225712467,"owners_count":17512404,"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":["clevercloud-example","postgresql","ruby-on-rails"],"created_at":"2024-08-04T17:00:50.200Z","updated_at":"2024-11-21T10:30:21.961Z","avatar_url":"https://github.com/CleverCloud.png","language":"Ruby","funding_links":[],"categories":["Examples"],"sub_categories":["Ruby"],"readme":"# RubyOnRails as RESTful Demo for Clever-Cloud\n\n## Description\n\nThis application is a fork from [official getting started](http://guides.rubyonrails.org/getting_started.html) which contains the configuration for Clever Cloud ruby application.\n\nThis application is a RESTful app which is using PostgreSQL addon.\n\n## Configuration\n\n### Environment variables\n\nOn your Clever Cloud application you must specify some environment variables as following:\n\n- `RUBY_VERSION` with one of the next values:\n  - \"2\" will select the greatest \"2.X.Y\" version available;\n  - \"2.3\" will select the greatest \"2.0.Y\" version available;\n  - \"2.3.1-p112\" will select the \"2.3.1-p112\" version.\n- `SECRET_KEY_BASE` with a value that can be generate using `rake secret`.\n\nThis application is provided to work with Postgresql, you have to define the next variables, or link your application with Postgresql addon on Clever.\n\n- `POSTGRESQL_ADDON_DB`\n- `POSTGRESQL_ADDON_HOST`\n- `POSTGRESQL_ADDON_USER`\n- `POSTGRESQL_ADDON_PASSWORD`\n- `POSTGRESQL_ADDON_PORT`\n\n### Clever Cloud\n\nTo work, your application must contains the file `clevercloud/ruby.json` which contains:\n\n```json\n{\n    \"deploy\": {\n        \"rakegoals\": [\n            \"db:migrate\",\n            \"assets:precompile\"\n        ]\n    }\n}\n```\n\nCreate your data schema, relations and enable rails assets pipeline.\n\n## Application\n\nThis REST API provides a design to definie new content on website, there is an **HTTP Basic Authentication** with username: `admin` and password: `admin`.\n\nThese are the routes available.\n\n```\n              Prefix Verb   URI Pattern                                       Controller#Action\n       welcome_index GET    /welcome/index(.:format)                          welcome#index\n    article_comments GET    /articles/:article_id/comments(.:format)          comments#index\n                     POST   /articles/:article_id/comments(.:format)          comments#create\n new_article_comment GET    /articles/:article_id/comments/new(.:format)      comments#new\nedit_article_comment GET    /articles/:article_id/comments/:id/edit(.:format) comments#edit\n     article_comment GET    /articles/:article_id/comments/:id(.:format)      comments#show\n                     PATCH  /articles/:article_id/comments/:id(.:format)      comments#update\n                     PUT    /articles/:article_id/comments/:id(.:format)      comments#update\n                     DELETE /articles/:article_id/comments/:id(.:format)      comments#destroy\n            articles GET    /articles(.:format)                               articles#index\n                     POST   /articles(.:format)                               articles#create\n         new_article GET    /articles/new(.:format)                           articles#new\n        edit_article GET    /articles/:id/edit(.:format)                      articles#edit\n             article GET    /articles/:id(.:format)                           articles#show\n                     PATCH  /articles/:id(.:format)                           articles#update\n                     PUT    /articles/:id(.:format)                           articles#update\n                     DELETE /articles/:id(.:format)                           articles#destroy\n                root GET    /                                                 welcome#index\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCleverCloud%2Frails-postgresql-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCleverCloud%2Frails-postgresql-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCleverCloud%2Frails-postgresql-example/lists"}