Runway
Runway is built and operated in the EU!

Private Go Modules

As long as all the code your Golang application is using is contained within the repository you are deploying, then there’s absolutely nothing for you to do. For everything else, let’s walk through it in this guide!

If you use private external dependencies, then we have three solutions.

Vendoring

Vendoring all your dependencies is the simplest approach. The setup steps are already detailed in the faster builds guide, please check it out!

Using your own vendor directory completely avoids the need for any tokens and additional configuration via GOPRIVATE or with a custom GOPROXY. This is our preferred approach.

GOPRIVATE

To handle private dependencies, set GOPRIVATE and GIT_TOKEN so Runway’s builder knows about them:

Runway CLI
runway app config set \
  GOPRIVATE=https://github.com/org/lib \
  GIT_TOKEN=your-personal-access-token
project.toml
[build]
  [[build.env]]
    name="GOPRIVATE"
    value="https://github.com/org/lib"
  [[build.env]]
    name = "GIT_TOKEN"
    value = "your-personal-access-token"

The token is a critical subject: we recommend to set the GIT_TOKEN via runway app config set, and only set GOPRIVATE in project.toml if the file is your preferred way of maintaining build related configuration.

GOPROXY

You can run your own go-proxy and handle private modules outside of the Runway build process:

Runway CLI
runway app config set \
  GOPROXY=https://username:token@your-proxy.com,direct
project.toml
[build]
  [[build.env]]
    name = "GOPROXY"
    value = "https://username:token@your-proxy.com,direct"