{"id":25808167,"url":"https://github.com/nullstone-io/rails6-api-quickstart","last_synced_at":"2026-07-13T10:32:06.324Z","repository":{"id":107481758,"uuid":"488730488","full_name":"nullstone-io/rails6-api-quickstart","owner":"nullstone-io","description":"Rails API Quickstart for Nullstone","archived":false,"fork":false,"pushed_at":"2023-08-17T15:24:15.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T15:38:58.750Z","etag":null,"topics":[],"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/nullstone-io.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-04T20:12:52.000Z","updated_at":"2022-05-10T14:00:11.000Z","dependencies_parsed_at":"2025-02-27T21:59:42.382Z","dependency_job_id":"d78ac923-e180-4ad0-af64-fefb22dd78fb","html_url":"https://github.com/nullstone-io/rails6-api-quickstart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nullstone-io/rails6-api-quickstart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Frails6-api-quickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Frails6-api-quickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Frails6-api-quickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Frails6-api-quickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nullstone-io","download_url":"https://codeload.github.com/nullstone-io/rails6-api-quickstart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Frails6-api-quickstart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35420322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"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":[],"created_at":"2025-02-27T21:59:29.565Z","updated_at":"2026-07-13T10:32:06.319Z","avatar_url":"https://github.com/nullstone-io.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rails API Quickstart\n\nThis is a Rails API Quickstart for [Nullstone](https://nullstone.io).\nThis is based off the official Rails [getting started](https://guides.rubyonrails.org/getting_started.html) guide.\n\nThis quickstart is set up with:\n- Ruby 3.1\n- Rails 6.1\n- Postgresql Database\n    - Migrations are executed on start of docker image\n- Error logs are emitted to stdout for docker builds\n- Hot reload for local development\n\n## How to launch via Nullstone\n\n1. Create postgresql datastore.\n2. Create a public web app. (Remember `app-name` for later)\n3. Add the postgresql datastore (from step 1) to the app.\n4. Add the `SECRET_KEY_BASE for Rails Cookies` capability to the app.\n5. Provision\n  ```shell\n  nullstone up --wait --block=\u003capp-name\u003e --env=\u003cenv-name\u003e\n  ```\n6. Build, push, and deploy\n  ```shell\n  docker build -t rails-quickstart .\n  nullstone launch --source=rails-quickstart --app=\u003capp-name\u003e --env=\u003cenv-name\u003e\n  ```\n\n## Running locally\n\nYou can run this project locally inside Docker or using rails alone.\nTo use Docker, this project contains `docker-compose.yml` that runs with `RAILS_ENV=development`.\nThis ensures that using Docker doesn't prohibit handy development features:\n- Pretty error logs are displayed in the browser.\n- Hot reload is configured so that changes to rails files doesn't require a docker rebuild or restart.\n\nTo run using Docker locally, use docker compose:\n```shell\ndocker compose up\n```\n\nThen, visit [http://localhost:3000](http://localhost:3000).\n\n### Hot reload\n\nThe `app` in `docker-compose.yml` is configured to automatically reload changes to files.\nYou do not need to rebuild/restart the app when making changes to code.\n\n### Update dependencies\n\nTo make changes to dependencies, make changes to `Gemfile` and restart your docker container.\n`bundle install` happens automatically at the boot of the docker container to update dependencies.\n\n```shell\ndocker compose restart app\n```\n\n## Details on quickstart\n\nThis web app was generated following these steps.\n1. `rails new . --database=postgresql --skip-test --api`\n2. Add the following to `Gemfile`\n  ```\n  group :test do\n    gem 'rspec-rails'\n  end\n  ```\n3. `bundle install`\n4. `rails generate rspec:install`\n5. Set logs to stdout in development mode.\n  ```\n  # config/environments/development.rb\n  ...\n  # Use default logging formatter so that PID and timestamp are not suppressed.\n  config.log_formatter = ::Logger::Formatter.new\n\n  if ENV[\"RAILS_LOG_TO_STDOUT\"].present?\n    logger           = ActiveSupport::Logger.new(STDOUT)\n    logger.formatter = config.log_formatter\n    config.logger     = ActiveSupport::TaggedLogging.new(logger)\n  end\n  ```\n5. Swap out the default database config in `config/database.yml`\n  ```yaml\n  default: \u0026default\n  adapter: \u003c%= ENV.fetch(\"DB_ADAPTER\") { \"postgresql\" } %\u003e\n  encoding: unicode\n  # For details on connection pooling, see Rails configuration guide\n  # https://guides.rubyonrails.org/configuring.html#database-pooling\n  pool: \u003c%= ENV.fetch(\"RAILS_MAX_THREADS\") { 5 } %\u003e\n  url: \u003c%= ENV['DATABASE_URL'] %\u003e\n  ```\n6. Comment out production database settings in `config/database.yml`\n  ```yaml\n  production:\n  \u003c\u003c: *default\n  #  database: rails6_api_quickstart_production\n  #  username: rails6_api_quickstart\n  #  password: \u003c%= ENV['RAILS6_API_QUICKSTART_DATABASE_PASSWORD'] %\u003e\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullstone-io%2Frails6-api-quickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullstone-io%2Frails6-api-quickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullstone-io%2Frails6-api-quickstart/lists"}