Environment Variables
This page provides a comprehensive reference for the environment variables used in the backend and frontend projects. These are configured in the .env file for local development and in the Cloudflare Pages dashboard for production and staging environments.
Backend (.env)
Section titled “Backend (.env)”These variables are defined in the .env file within the backend directory and are used by the Docker Compose services.
Global & Backup
Section titled “Global & Backup”GPG_PASSPHRASEThe passphrase used to encrypt and decrypt the nightly database backups.PORTAINER_PASSWORDThe admin password for the Portainer dashboard.TZSets the system timezone for all services. Default:Asia/Kolkata.
Directus
Section titled “Directus”KEY&SECRETUnique, random strings used by Directus for security, including authentication and encryption.ADMIN_EMAIL&ADMIN_PASSWORDThe credentials for the default administrative user in Directus.PUBLIC_URLThe primary, public-facing URL where the Directus API can be accessed. Example:https://admin.innovspatial.com.TURNSTILE_SECRET_KEYThe secret key for Cloudflare Turnstile (a CAPTCHA alternative) to protect public-facing forms.MAX_PAYLOAD_SIZEThe maximum size for API request payloads. Default:10mb.FLOWS_ENV_ALLOW_LISTA comma-separated list of environment variables that should be accessible within Directus Flows.
Database (PostgreSQL)
Section titled “Database (PostgreSQL)”POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORDCore credentials for the PostgreSQL server itself.DB_CLIENTSpecifies the database client. Set topgfor PostgreSQL.DB_HOST,DB_PORT,DB_DATABASE,DB_USER,DB_PASSWORDConnection details specifically for thedirectusdatabase. These often reference the main PostgreSQL credentials.DB_POOL_MIN&DB_POOL_MAXThe minimum and maximum number of connections to keep in the database connection pool.
Caching
Section titled “Caching”CACHE_ENABLEDWhether to enable the internal Directus cache. Default:true.CACHE_TTLThe default Time-To-Live for cached items in seconds. Default:86400(1 day).CACHE_CONTROL_S_MAXAGEThes-maxagevalue for theCache-Controlheader, used by shared caches like CDNs. Default:2592000(30 days).
Storage & Email
Section titled “Storage & Email”STORAGE_LOCATIONSDefines the storage adapters. Default:local.STORAGE_LOCAL_ROOTThe root directory for local file storage. Default:./uploads.EMAIL_FROMThe default “from” address for emails sent by Directus.EMAIL_TRANSPORT,EMAIL_SMTP_HOST, etc. Configuration for the SMTP service used to send transactional emails.
Plausible Analytics
Section titled “Plausible Analytics”ADMIN_USER_EMAIL,ADMIN_USER_NAME,ADMIN_USER_PWDCredentials for the initial administrative user for the Plausible dashboard.BASE_URLThe public-facing URL for the Plausible Analytics dashboard. Example:https://analytics.innovspatial.com.SECRET_KEY_BASEA unique secret key for securing the Plausible instance.DATABASE_URLThe connection string for the Plausible PostgreSQL database.CLICKHOUSE_DATABASE_URLThe connection string for the ClickHouse events database.
Netdata
Section titled “Netdata”NETDATA_CLAIM_TOKEN&NETDATA_CLAIM_ROOMSCredentials for claiming the Netdata agent and associating it with your Netdata Cloud account.NETDATA_CLAIM_URLThe URL for the Netdata Cloud claiming service.
Frontend
Section titled “Frontend”Cloudflare Pages
Section titled “Cloudflare Pages”These variables are configured directly in the Cloudflare Pages dashboard for each frontend project (innovspatial and hawaii).
DIRECTUS_STATUS_FILTERControls which items are fetched from Directus based on their status.- Production (
mainbranch): Set topublished. - Staging (
stagingbranch): Set todraft,published.
- Production (