Files
Gardomatic/remote/setup/.env.example
T
2026-09-14 19:58:31 +02:00

92 lines
4.2 KiB
Bash

# Copy this template to .env, .env.testserver, and .env.demo as needed. Keep
# separate database credentials and URLs in every file. The files are sourced
# as Bash configuration and must be trusted and restricted to the administrator.
# `make config/init` creates all three with mode 0600.
# Server provisioning ---------------------------------------------------------
# IANA timezone accepted by timedatectl. List available values with:
# timedatectl list-timezones
GARDOMATIC_SETUP_TIMEZONE='Europe/Berlin'
# golang-migrate release number without a leading "v". The script supports
# Linux AMD64 and ARM64 release archives.
GARDOMATIC_MIGRATE_VERSION='4.19.1'
# Allowed exactly: true or false. false leaves rebooting to the administrator.
GARDOMATIC_REBOOT='false'
# PostgreSQL provisioning -----------------------------------------------------
# Database and role names. Allowed: lowercase letters, digits and underscores;
# the first character must be a letter or underscore.
GARDOMATIC_DB_NAME='gardomatic'
GARDOMATIC_DB_USER='gardomatic'
# Required non-empty password used to create the PostgreSQL role. This separate
# value is not installed in the service environment, but the DSN below is also a
# secret because it normally contains the same password.
GARDOMATIC_DB_PASSWORD=''
# Application runtime ---------------------------------------------------------
# Allowed: development, test, production. Keep production on public servers.
GARDOMATIC_ENV='production'
# Required PostgreSQL connection string. Percent-encode URI-reserved characters
# in the password. Example form:
# postgres://gardomatic:ENCODED_PASSWORD@localhost:5432/gardomatic?sslmode=disable
GARDOMATIC_DB_DSN=''
# Connection-pool limits. Open must be at least 1; idle must be between 0 and open.
GARDOMATIC_DB_MAX_OPEN_CONNS='25'
GARDOMATIC_DB_MAX_IDLE_CONNS='25'
# Go duration, for example 30s, 15m or 1h30m.
GARDOMATIC_DB_MAX_IDLE_TIME='15m'
# Listener hosts. Use 127.0.0.1 behind a reverse proxy; an empty value listens on
# all available interfaces. Ports must be integers from 1 to 65535.
GARDOMATIC_API_HOST='127.0.0.1'
GARDOMATIC_API_PORT='4000'
GARDOMATIC_WEB_HOST='127.0.0.1'
GARDOMATIC_WEB_PORT='4040'
# Absolute internal API URL used by the web process.
GARDOMATIC_API_BASE_URL='http://127.0.0.1:4000'
# Required absolute public HTTP(S) URL. Use HTTPS and normally no path in production.
GARDOMATIC_WEB_BASE_URL=''
# Non-empty cookie name shared by API and web.
GARDOMATIC_SESSION_COOKIE_NAME='gardomatic_session'
# Go durations, for example 30m, 12h or 168h. Use positive values.
GARDOMATIC_SESSION_LIFETIME='12h'
GARDOMATIC_SESSION_IDLE_TIMEOUT='30m'
# Boolean. Accepted true values: 1, t, T, TRUE, true, True. Accepted false
# values: 0, f, F, FALSE, false, False. Must be true in production.
GARDOMATIC_COOKIE_SECURE='true'
# Boolean with the same accepted forms as GARDOMATIC_COOKIE_SECURE.
GARDOMATIC_RATE_LIMIT_ENABLED='true'
# Positive requests per second; decimal values such as 0.5 are accepted.
GARDOMATIC_RATE_LIMIT_RPS='10'
# Positive integer defining the permitted request burst.
GARDOMATIC_RATE_LIMIT_BURST='40'
# Comma-separated absolute URLs; every entry requires a scheme and host. Empty
# allows no cross-origin browser access. Use origins without paths, for example:
# https://garden.example.com,https://admin.example.com
GARDOMATIC_CORS_TRUSTED_ORIGINS=''
# Destructive demo reset. Leave false on every non-demo database. When true,
# deployments require /etc/gardomatic/demo-password and enable the nightly timer.
GARDOMATIC_DEMO_RESET_ENABLED='false'
# Required when the demo reset is enabled. The API protects this shared account's
# profile, email address, password and sessions from changes by visitors.
GARDOMATIC_DEMO_ACCOUNT_EMAIL=''
# Delivery mode. Allowed exactly: file or smtp. Production normally uses smtp.
GARDOMATIC_SMTP_MODE='smtp'
# Required in smtp mode: resolvable SMTP hostname and TCP port.
GARDOMATIC_SMTP_HOST=''
GARDOMATIC_SMTP_PORT='587'
# Required non-empty credentials in smtp mode.
GARDOMATIC_SMTP_USERNAME=''
GARDOMATIC_SMTP_PASSWORD=''
# Required sender mailbox in smtp mode, for example gardomatic@example.com.
GARDOMATIC_SMTP_SENDER=''
# Writable absolute path required only when GARDOMATIC_SMTP_MODE=file.
GARDOMATIC_SMTP_FILE_PATH='/tmp/gardomatic-mails.log'