Files
computer-playbook/roles/web-app-bookwyrm/templates/env.j2

43 lines
1.6 KiB
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Core
BOOKWYRM_URL="{{ BOOKWYRM_URL }}"
DOMAIN="{{ BOOKWYRM_HOSTNAME }}"
ALLOWED_HOSTS="{{ BOOKWYRM_HOSTNAME }},127.0.0.1,localhost"
PORT="{{ WEB_PORT }}"
WEB_PROTOCOL="{{ WEB_PROTOCOL }}"
MEDIA_ROOT="/app/media"
DATA_ROOT="/app/data"
REGISTRATION_OPEN={{ BOOKWYRM_REGISTRATION_OPEN }}
ALLOW_INVITE_REQUESTS={{ BOOKWYRM_ALLOW_INVITE_REQUESTS }}
# Django/Secrets (provide via vault/env in production)
SECRET_KEY="{{ BOOKWYRM_SECRET_KEY }}"
EMAIL="{{ users['no-reply'].email }}"
# Database
DATABASE_URL="postgres://{{ database_username }}:{{ database_password }}@{{ database_host }}:{{ database_port }}/{{ database_name }}"
# Redis / Celery
REDIS_BROKER_URL="{{ BOOKWYRM_REDIS_BROKER_URL }}"
REDIS_CACHE_URL="{{ BOOKWYRM_REDIS_BASE_URL }}/1"
CELERY_BROKER_URL="{{ BOOKWYRM_REDIS_BROKER_URL }}"
# Proxy (if BookWyrm sits behind reverse proxy)
FORWARDED_ALLOW_IPS="*"
USE_X_FORWARDED_HOST="true"
SECURE_PROXY_SSL_HEADER="HTTP_X_FORWARDED_PROTO,{{ WEB_PROTOCOL }}"
# OIDC (optional only if BOOKWYRM_OIDC_ENABLED)
{% if BOOKWYRM_OIDC_ENABLED %}
OIDC_TITLE="{{ BOOKWYRM_OIDC_LABEL | replace('\"','\\\"') }}"
OIDC_ISSUER="{{ BOOKWYRM_OIDC_ISSUER }}"
OIDC_AUTHORIZATION_ENDPOINT="{{ BOOKWYRM_OIDC_AUTH_URL }}"
OIDC_TOKEN_ENDPOINT="{{ BOOKWYRM_OIDC_TOKEN_URL }}"
OIDC_USERINFO_ENDPOINT="{{ BOOKWYRM_OIDC_USERINFO_URL }}"
OIDC_END_SESSION_ENDPOINT="{{ BOOKWYRM_OIDC_LOGOUT_URL }}"
OIDC_JWKS_URI="{{ BOOKWYRM_OIDC_JWKS_URL }}"
OIDC_CLIENT_ID="{{ BOOKWYRM_OIDC_CLIENT_ID }}"
OIDC_CLIENT_SECRET="{{ BOOKWYRM_OIDC_CLIENT_SECRET }}"
OIDC_SCOPES="{{ BOOKWYRM_OIDC_SCOPES }}"
OIDC_UNIQUE_ATTRIBUTE="{{ BOOKWYRM_OIDC_UNIQUE_ATTRIBUTE }}"
{% endif %}