
PENPOT_HTTP_SERVER_PORT={{ penpot_ports['backend'] }}
PENPOT_SREPL_PORT={{ penpot_ports['srepl'] }}

# Should be set to the public domain where penpot is going to be served.
PENPOT_PUBLIC_URI={{ penpot_public_url }}

# Standard database connection parameters (only postgresql is supported):
PENPOT_DATABASE_URI=postgresql://{{ penpot_db_server }}:{{ penpot_db_port }}/{{ penpot_db_name }}
PENPOT_DATABASE_USERNAME={{ penpot_db_user }}
PENPOT_DATABASE_PASSWORD={{ penpot_db_pass }}

# Redis is used for the websockets notifications.
PENPOT_REDIS_URI={{ penpot_redis_url }}

# By default, files uploaded by users are stored in local filesystem. But it
# can be configured to store in AWS S3 or completely in de the database.
# Storing in the database makes the backups more easy but will make access to
# media less performant.
ASSETS_STORAGE_BACKEND=assets-fs
PENPOT_STORAGE_ASSETS_FS_DIRECTORY={{ penpot_root_dir }}/data/assets

# Telemetry. When enabled, a periodical process will send anonymous data about
# this instance. Telemetry data will enable us to learn on how the application
# is used, based on real scenarios. If you want to help us, please leave it
# enabled.
PENPOT_TELEMETRY_ENABLED=false

# Email sending configuration. By default, emails are printed in the console,
# but for production usage is recommended to setup a real SMTP provider. Emails
# are used to confirm user registrations.
PENPOT_SMTP_ENABLED=true
PENPOT_SMTP_DEFAULT_FROM={{ penpot_email_from }}
PENPOT_SMTP_DEFAULT_REPLY_TO={{ penpot_email_from }}
PENPOT_SMTP_HOST={{ penpot_smtp_server }}
PENPOT_SMTP_PORT={{ penpot_smtp_port }}
{% if penpot_smtp_user is defined and penpot_smtp_pass is defined %}
PENPOT_SMTP_USERNAME={{ penpot_smtp_user }}
PENPOT_SMTP_PASSWORD={{ penpot_smtp_pass }}
{% endif %}
PENPOT_SMTP_TLS={{ penpot_smtp_tls | ternary('true','false') }}
PENPOT_SMTP_SSL={{ penpot_smtp_ssl | ternary('true','false') }}

# Feature flags (registration, auth methods etc.)
PENPOT_FLAGS="{{ penpot_flags | join(' ') }}"

# Comma separated list of allowed domains to register. Empty to allow all.
PENPOT_REGISTRATION_DOMAIN_WHITELIST="{{ penpot_user_registration_allowed_domains | join(',') }}"

## Authentication providers
{% if penpot_oidc_auth %}
PENPOT_OIDC_BASE_URI={{ penpot_oidc_base_url }}
PENPOT_OIDC_USER_URI={{ penpot_oidc_user_url }}
PENPOT_OIDC_AUTH_URI={{ penpot_oidc_auth_url }}
PENPOT_OIDC_TOKEN_URI={{ penpot_oidc_token_url }}
PENPOT_OIDC_SCOPES="{{ penpot_oidc_scopes }}"
PENPOT_OIDC_CLIENT_ID={{ penpot_oidc_client_id }}
PENPOT_OIDC_CLIENT_SECRET={{ penpot_oidc_client_secret }}
{% endif %}

{% if penpot_ldap_auth %}
# LDAP
PENPOT_LDAP_HOST={{ penpot_ldap_server }}
PENPOT_LDAP_PORT={{ penpot_ldap_port }}
PENPOT_LDAP_SSL={{ penpot_ldap_ssl | ternary('true', 'false') }}
PENPOT_LDAP_STARTTLS={{ penpot_ldap_tls | ternary('true', 'false') }}
PENPOT_LDAP_BASE_DN={{ penpot_ldap_base_dn }}
{% if penpot_ldap_bind_dn is defined and penpot_ldap_bind_pass is defined %}
PENPOT_LDAP_BIND_DN={{ penpot_ldap_bind_dn }}
PENPOT_LDAP_BIND_PASSWORD={{ penpot_ldap_bind_pass }}
{% endif %}
PENPOT_LDAP_ATTRS_USERNAME={{ penpot_ldap_attr_username }}
PENPOT_LDAP_ATTRS_EMAIL={{ penpot_ldap_attr_email }}
PENPOT_LDAP_ATTRS_FULLNAME={{ penpot_ldap_attr_fullname }}
{% endif %}
