pockethost/.env-template
2023-10-11 20:32:00 -07:00

103 lines
3.5 KiB
Plaintext

# ===========
# This environment variable template is the canonical source for all environment variables used by PocketHost.
# PocketHost relies upon environment variables rather than prop drilling where possible.
# ===========
# This is the porject root (where the .env file lives)
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Do this so these actually export as environment variables, not just shell variables
set -a
# ==============
# PUBLIC variables are available and visible to the frontends
# The defaults shown here will invoke LOCAL development modes. If they are not specified,
# the frontends will default to the production environment.
#
# To create prduction builds, simply omit these, or if you have a special need, supply
# the custom values here.
# ==============
# The global debugging flag, used by frontend and backend. This will enable debug-level
# logging on all fronts
PUBLIC_DEBUG=true
# https or http, as you wish
PUBLIC_HTTP_PROTOCOL=https
# The apex domain for the whole site.
PUBLIC_APEX_DOMAIN=pockethost.lvh.me
#--------------
# You typically won't need to change these, unless you have a very specific setup
# https://<PUBLIC_APEX_DOMAIN> - marketing/lander
# https://app.<PUBLIC_APEX_DOMAIN> - dashboard
# https://pockethost-central.<PUBLIC_APEX_DOMAIN> - mothership
# https://*.edge.<PUBLIC_APEX_DOMAIN> - edge workers
#--------------
# The domain name the dashboard app
PUBLIC_APP_DOMAIN=app.$PUBLIC_APEX_DOMAIN
# The domain name for the marketing/blog domain
PUBLIC_BLOG_DOMAIN=$PUBLIC_APEX_DOMAIN
# The apex domain for the daemon
PUBLIC_EDGE_APEX_DOMAIN=edge.$PUBLIC_APEX_DOMAIN
# The URL of the central PocketHost database. This is both a subdomain and a file name.
PUBLIC_MOTHERSHIP_URL=$PUBLIC_HTTP_PROTOCOL://pockethost-central.$PUBLIC_APEX_DOMAIN
# =========
# Mothership variables (private)
# =========
# The path to the root directory where all PocketHost data is stored for all users
DAEMON_PB_DATA_DIR=$ROOT/.data
# The path to the migrations directory where the PocketHost mothership can find its migrations.
# Typically, this is separate from the other instances since it's under source control.
DAEMON_PB_MIGRATIONS_DIR=$ROOT/packages/daemon/migrations
# The path to the hooks directory where the PocketHost mothership can find its hooks.
# Typically, this is separate from the other instances since it's under source control.
DAEMON_PB_HOOKS_DIR=$ROOT/packages/daemon/pb_hooks
# The username and password of the admin account PocketHost will use to perform
# privileged backend operations
DAEMON_PB_USERNAME=admin@pockethost.lvh.me
DAEMON_PB_PASSWORD=admin@pockethost.lvh.me
# The port the daemon listens on
DAEMON_PORT=80
# The port the mothership listens on
DAEMON_PB_PORT=8090
# The timeout after which instances will be shut down.
DAEMON_PB_IDLE_TTL=5000
# Limit the PocketBase versions available, or leave blank to allow all versions
DAEMON_PB_SEMVER=
# IPCIDR settings - Use these to only allow Cloudflare access
DAEMON_IPCIDR_LIST=173.245.48.0/20,103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,141.101.64.0/18,108.162.192.0/18,190.93.240.0/20,188.114.96.0/20,197.234.240.0/22,198.41.128.0/17,162.158.0.0/15,104.16.0.0/13,104.24.0.0/14,172.64.0.0/13,131.0.72.0/22
# SSL key used for HTTP proxy and FTP daemon
SSL_KEY=$ROOT/ssl/pockethost.test.key
SSL_CERT=$ROOT/ssl/pockethost.test.crt
# Path to where the PocketBase binaries are cached
PH_BIN_CACHE=$ROOT/.pbincache
# FTP settings
PH_FTP_PASV_IP=0.0.0.0
PH_FTP_PASV_PORT_MIN=10000
PH_FTP_PASV_PORT_MAX=20000
set +a