Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Latest commit

 

History

History
106 lines (55 loc) · 2.49 KB

environment.md

File metadata and controls

106 lines (55 loc) · 2.49 KB

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

GITHUB_APP_ID

e.g. 22615

GITHUB_APP_LINK

e.g. colophon-dev

GITHUB_CLIENT_ID

e.g. Iv1.c576b97bab9e78b4

GITHUB_CLIENT_SECRET

e.g. 17a59c0da3a8401a0e5b16d35153a26451b20f42

GITHUB_PRIVATE_KEY

You have two methods of passing the private key to the application:

  • Populating this environment variable with the content of the generated .pem file
  • Using the GITHUB_PRIVATE_KEY_PATH variable below and uploading the .pem file to your server

e.g. -----BEGIN RSA PRIVATE KEY-----\neIEogIBAAKCAQEA0d...\n-----END RSA PRIVATE KEY-----

Hint: 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

GITHUB_PRIVATE_KEY_PATH

e.g. /path/to/colophon-app.2019-03-01.private-key.pem

GITHUB_WEBHOOK_SECRET

Created by you when Creating a GitHub App

App Settings

COLOPHON_LINK

Domain where this service lives

NOTE: this 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.

e.g. https://colophon.my-company.com

COLOPHON_PORT

Specifies the port we want to listen to. (Defaults to 3000)

NOTE: if you're using a PaaS environment that dynamically assigns PORT value, simply keep this value empty and Colophon will use PORT instead.

e.g. localhost:3000

COLOPHON_SESSION_SECRET

Cookie Session secret

e.g. my-super-secret-cookie-secret

Database config

Colophon requires a PostgreSQL database instance, you can find the database initialization schemas under the database folder

Please use an appropriately managed/scaled database server then direct Colophon to connect to it using the following environment variables:

POSTGRES_HOST

The database server host address

e.g. localhost

POSTGRES_PORT

The database server port

e.g. 5432

POSTGRES_DB

The database name

e.g. colophon_db

POSTGRES_USER

The database user

e.g. colophon_user

POSTGRES_PASSWORD

The database user password

e.g. colophon_user_password