Builds

Buildpacks

Railway uses Cloudnative Buildpacks to attempt to build and deploy with zero configuration. Currently we support the following languages out of the box

  • NodeJS
  • Python
  • Go
  • Ruby
  • Java

If you have a language that you want us to support, please don't hesitate to reach out and let us know.

NodeJS

The NodeJS buildpack detects if your build is Node by looking for a package.json file. If found, the build will execute the following NPM (or Yarn) commands.

If no Procfile is found, a web process will be started with npm start.

Python

The Python buildpack detects if your build is Python by looking for a requirements.txt file. If found, dependencies will be installed using pip.

The default Python version is 3.6.

Go

The Go buildpack will detect your build is Go if you are using go modules, dep, govendor, glide, GB, or Godep. If detected, dependencies will be installed and the source compiled.

If no Procfile is found, a web process will be started with go run main.go.

Ruby

The Ruby buildpack detects if your build is Ruby by looking for Gemfile and Gemfile.lock files. If found, dependencies will be installed with bundle install.

Java

The Java buildpack detects if your build is Java by looking for a pom.xml file. If found, Maven will download all dependencies and build the project.

Procfile

Railway supports Procfiles, a file that can be included in the project to specify which command to run when the deployment starts.

A Procfile is in the format of

When Railway deploys your build, all process will be started by running their respective command.

Note: some buildpacks specify a default start command

Web process

HTTP servers should use the web process type. This process should listen on the PORT environment variable and will receive HTTP traffic. For example,

Dockerfiles

We will look for and use a Dockerfile at the project root if it exists.


Edit this file on GitHub