Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with Spring Boot
      • Java Advanced Topics
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Continuous Delivery
  • Continuous Integration
  • Heroku CI In-Dyno Databases

Heroku CI In-Dyno Databases

English — 日本語に切り替える

Last updated April 05, 2023

Table of Contents

  • In-Dyno Databases
  • Usage
  • Release Policy
  • Set Version
  • Restrictions

In-Dyno Databases

In-Dyno databases are databases that run inside your test-run’s dyno. These databases differ from the more traditional Heroku addons like Heroku Postgres and Heroku Data for Redis in a few notable ways:

  • Database queries do not pass over the network, and, as a result, finish in a more consistent and fast speed.
  • Many of the restrictions that apply to external addons (like row limits, connection limits, feature enablement, and the ability to create more database) do not apply.
  • The data is ephemeral, meaning it is not persisted, backed up, or available outside of the dyno in any way.

The primary drawback to this type of database is its ephemerality; as such, this type of database would not be appropriate for production use. However, because test runs are ephemeral themselves, the advantages of greater flexibility and speed make it a great improvement for your CI workflow.

Usage

Before you can use In-Dyno databases, you need to specify a buildpack in your app.json that reflects the language you’re testing. For example:

{
  "buildpacks": [
    { "url": "heroku/ruby" }
  ]
}

You can use In-Dyno databases for your Heroku CI test runs by using an in-dyno plan. You may specify this in your app.json. For example:

{
  "environments": {
    "test": {
      "addons": ["heroku-postgresql:in-dyno", "heroku-redis:in-dyno"]
    }
  }
}

When a test run begins, you can use the database as normal via DATABASE_URL or REDIS_URL as appropriate. These urls will point to your locally installed database.

Release Policy

The In-Dyno databases will not always align with the traditional addon release. In-Dyno databases will generally target the latest major version and release point versions as needed.

Set Version

In the event you need a specific version of Postgres for your test runs, specify a value for POSTGRESQL_VERSION in your app.json file. Note that not all releases will be available in Heroku CI. We currently support major versions of 11, 12, 13, 14, and 15.

{
  "environments": {
    "test": {
      "env": { "POSTGRESQL_VERSION": "15" },
      "addons": ["heroku-postgresql:in-dyno"]
    }
  }
}

Similarly, to select a specific version of Redis for your test runs, specify a value for REDIS_VERSION in your app.json file. This should either be set to a Redis major version (eg 6.2 or 7.0) or the full version string such as 6.2.10. For example:

{
  "environments": {
    "test": {
      "env": { "REDIS_VERSION": "7.0" },
      "addons": ["heroku-redis:in-dyno"]
    }
  }
}

Restrictions

  • In-Dyno databases only work in Heroku CI. They will not be provisioned for any other type of app (such as Review Apps or Heroku Button Apps).
  • Currently, in-dyno plans are only supported for the heroku-redis and heroku-postgresql addons.
  • In-Dyno Postgres instances do not support SSL connections.
  • In-Dyno Postgres support is limited to the following extensions:
    • uuid
    • libxslt
    • libxml
    • openssl
    • gssapi
    • krb5

Keep reading

  • Continuous Integration

Feedback

Log in to submit feedback.

Heroku CI: Technical Detail on Test Run Lifecycle Heroku CI Parallel Test Runs

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences