Deploy a Template

Templates allow you to deploy a fully configured project that is automatically connected to infrastructure.

You can find featured templates on our template marketplace.

Template Deployment Flow

To deploy a template -

  • Find a template from the marketplace and click Deploy Now
  • If necessary, configure the required variables, and click Deploy
  • Upon deploy, you will be taken to your new project containing the template service(s)
    • Services are deployed directly from the defined source in the template configuration
    • After deploy, you can find the service source by going to the service's settings tab
    • Should you need to make changes to the source code, you will need to eject from the template repo to create your own copy. See next section for more detail.

Note: You can also deploy templates into existing projects, by clicking + New from your project canvas and selecting Template.

Eject from Template Repository

By default, services deployed from a template are attached to and deployed directly from the template repository. In some cases, you may want to have your own copy of the template repository.

Follow these steps to eject from the template repository and create a mirror in your own GitHub account.

  1. Ensure you have the "Template Service Eject" feature flag enabled
  2. In the service settings, under Source, find the Upstream Repo setting
  3. Click the Eject button
  4. Select the appropriate GitHub organization to create the new repository
  5. Click Eject service

Updatable Templates

When you deploy any services from a template based on a GitHub repo, every time you visit the project in Railway, we will check to see if the project it is based on has been updated by its creator.

If it has received an upstream update, we will create a branch on the GitHub repo that was created when deploying the template, allowing for you to test it out within a PR deploy.

If you are happy with the changes, you can merge the pull request, and we will automatically deploy it to your production environment.

If you're curious, you can read more about how we built updatable templates in this blog post

Note: This feature only works for services based on GitHub repositories. At this time, we do not have a mechanism to check for updates to Docker images from which services may be sourced.

Edit this file on GitHub