Configuration
Example .env file setup example:
shell
# Environment: production | development
NODE_ENV=production
# Name of the builder.
# Used for Dashboard and logging.
BUILDER_NAME="Dist server"
# Hostname where the builder will run, e.g. "build.company.com".
# Used to host builds on a non-production domain ("alias"), e.g. for non-master branch builds.
BUILDER_HOSTNAME=dist-server.com
# IP of server where builder will run on.
# Used to compare IP lookups to own IP.
BUILDER_IP=
# Port the builder's Express server will run on.
EXPRESS_PORT=3500
# For non-standard NGINX installations.
# Only use when certbot can't find NGINX.
# NGINX_BIN_PATH_OVERRIDE=
# Absolute path to where builds need to be saved to.
# NOTE: Convention is to use /var/www/{builder machine name}
BUILDS_PATH=/var/www/dist-server/
# Absolute path to where vhost files need to be saved to.
# NOTE: Convention is to use /etc/opt/{builder machine name}
VHOSTS_PATH=/etc/opt/dist-server/vhosts/
# Fill in a secret here, that repos need to provide in their webhook settings.
GIT_HOOK_SECRET=
# Name of the GitHub user that will be performing Git actions.
# This user needs to have access to repos that are built on this builder.
GITHUB_USERNAME=
# PAT (Personal Access Token) for the GitHub user that will be performing Git actions.
# This user needs to have access to repos that are built on this builder.
# NOTE:
# GitHub automatically removes personal access tokens that haven't been used in a year.
# If that happens, create a new token, change this variable, restart the Node.js process,
# and remove the .sources directory.
GITHUB_PERSONAL_ACCESS_TOKEN=
# Branches that are built and distributed, space-separated.
SUPPORTED_BRANCHES="main master staging"
# Slack bot User OAuth Access Token, starting with "xoxb-"
SLACK_TOKEN=
# Name of the Slack channel to log into, starting with #.
# NOTE: Wrap in "", otherwise treated as comment in .env files.
SLACK_CHANNEL_NAME=
# Boolean to enable/disable the Dashboard.
ENABLE_DASHBOARD=true
# Boolean to skip NGINX commands (e.g. when running locally).
SKIP_NGINX=false
# Boolean to skip certbot commands (e.g. when running locally).
SKIP_CERTBOT=false
#############################
# Dashboard variables #
#############################
# URL to the SVG logo of the company this builder is for.
DASHBOARD_SVG_LOGO_URL="https://dist-server.anoesj.dev/rocket.svg"