Links

Environment Setup

Colophon requires the following environment variables to operate successfully and interact with GitHub APIs

GitHub Settings

Values generated by GitHub when Creating a GitHub App
Environment Variable
Example
GITHUB_APP_ID
22615
GITHUB_APP_LINK
http://github.com/apps/colophon-dev
GITHUB_CLIENT_ID
Iv1.c576b97bab9e78b4
GITHUB_CLIENT_SECRET
17a59c0da3a8401a0e5b16d35153a26451b20f42
GITHUB_PRIVATE_KEY
-----BEGIN RSA PRIVATE KEY-----\neIEogIBAAKCAQEA0d...\n-----END RSA PRIVATE KEY-----
GITHUB_PRIVATE_KEY_PATH
/path/to/colophon-app.2019-03-01.private-key.pem
GITHUB_WEBHOOK_SECRET
Created by you when Creating a GitHub App
You have two methods of passing the private key to the application, only use one of them:
  • Using GITHUB_PRIVATE_KEYwith the inline content of the generated .pem file
  • Using GITHUB_PRIVATE_KEY_PATH and uploading the .pem file to your server
convert the .pem file into a single line with this command:
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' colophon-app.2019-03-01.private-key.pem

App Settings

Environment Variable
Example
Description
COLOPHON_LINK
http://colophon.my-company.com:8080
Domain where this service lives on the web.
COLOPHON_PORT
8484
Specifies the port we want to listen to on the server's network interface (Default: 3000)
COLOPHON_SESSION_SECRET
my-super-secret-cookie-secret
Cookie Session secret
COLOPHON_LINK is primarily used for the GitHub user authentication redirect, and should reflect the public facing URL & port your users will use.
This is used independently from the COLOPHON_PORT value.
If you're using a PaaS environment that dynamically assigns PORT value, simply keep COLOPHON_PORT empty and Colophon will use PORT instead.

Database config

Colophon requires a PostgreSQL database instance, you can find the database initialization scheams under the databasefolder
Please use an appropriately managed/scaled database server then direct Colophon to connect to it using the following environment variables:
Environment Variable
Example
Description
POSTGRES_HOST
localhost
The database server host address
POSTGRES_PORT
5432
The database server port
POSTGRES_DB
colophon_db
The database name
POSTGRES_USER
colophon_user
The database user
POSTGRES_PASSWORD
colophon_user_password
The database user password