Back to Suitenumerique

Docs variables

docs/env.md

5.0.041.5 KB
Original Source

Docs variables

Here we describe all environment variables that can be set for the docs application.

impress-backend container

These are the environment variables you can set for the impress-backend container.

OptionDescriptiondefault
AI_ALLOW_REACH_FROMUsers that can use AI must be this level. options are "public", "authenticated", "restricted"authenticated
OPENAI_SDK_API_KEYAI key to be used by the OpenAI python SDK
OPENAI_SDK_BASE_URLOpenAI compatible AI base url
MISTRAL_SDK_API_KEYAI key to be used by the Mistral python SDK /!\ Mistral sdk can be used only in async mode with uvicorn /!\
MISTRAL_SDK_BASE_URLMistral compatible AI base url
AI_BOTInformation to give to the frontend about the AI bot{ "name": "Docs AI", "color": "#8bc6ff" }
AI_FEATURE_ENABLEDEnable AI optionsfalse
AI_FEATURE_BLOCKNOTE_ENABLEDEnable Blocknote AI optionsfalse
AI_FEATURE_LEGACY_ENABLEDEnable legacyAI optionstrue
AI_MODELAI Model to use
AI_VERCEL_SDK_VERSIONThe vercel AI SDK version used6
ALLOW_LOGOUT_GET_METHODAllow get logout methodtrue
API_USERS_LIST_LIMITLimit on API users5
API_USERS_LIST_THROTTLE_RATE_BURSTThrottle rate for api on burst30/minute
API_USERS_LIST_THROTTLE_RATE_SUSTAINEDThrottle rate for api180/hour
API_USERS_SEARCH_QUERY_MIN_LENGTHMinimum characters to insert to search a user3
AWS_S3_ACCESS_KEY_IDAccess id for s3 endpoint
AWS_S3_ENDPOINT_URLS3 endpoint
AWS_S3_REGION_NAMERegion name for s3 endpoint
AWS_S3_SECRET_ACCESS_KEYAccess key for s3 endpoint
AWS_S3_SIGNATURE_VERSIONS3 signature version (s3v4 or s3)s3v4
AWS_STORAGE_BUCKET_NAMEBucket name for s3 endpointimpress-media-storage
CACHES_DEFAULT_TIMEOUTCache default timeout30
CACHES_DEFAULT_KEY_PREFIXThe prefix used to every cache keys.docs
COLLABORATION_API_URLCollaboration api host
COLLABORATION_SERVER_SECRETCollaboration api secret
COLLABORATION_WS_NOT_CONNECTED_READY_ONLYUsers not connected to the collaboration server cannot editfalse
COLLABORATION_WS_URLCollaboration websocket url
CONVERSION_API_CONTENT_FIELDConversion api content fieldcontent
CONVERSION_API_ENDPOINTConversion API endpointconvert
CONVERSION_API_SECURERequire secure conversion apifalse
CONVERSION_API_TIMEOUTConversion api timeout30
CONVERSION_FILE_MAX_SIZEThe file max size allowed when uploaded to convert it20971520 (20MB)
CONVERSION_FILE_EXTENSIONS_ALLOWEDExtension list managed by the conversion service[".docx", ".md"]
CRISP_WEBSITE_IDCrisp website id for support
DB_ENGINEEngine to use for database connectionsdjango.db.backends.postgresql_psycopg2
DB_HOSTHost of the databaselocalhost
DB_NAMEName of the databaseimpress
DB_PASSWORDPassword to authenticate withpass
DB_PORTPort of the database5432
DB_PSYCOPG_POOL_ENABLEDEnable or not the psycopg pool configuration in the default database optionsFalse
DB_PSYCOPG_POOL_MIN_SIZEThe psycopg min pool size4
DB_PSYCOPG_POOL_MAX_SIZEThe psycopg max pool sizeNone
DB_PSYCOPG_POOL_TIMEOUTThe default maximum time in seconds that a client can wait to receive a connection from the pool3
DB_USERUser to authenticate withdinum
DJANGO_ALLOWED_HOSTSAllowed hosts[]
DJANGO_CELERY_BROKER_TRANSPORT_OPTIONSCelery broker transport options{}
DJANGO_CELERY_BROKER_URLCelery broker urlredis://redis:6379/0
DJANGO_CORS_ALLOWED_ORIGINSList of origins allowed for CORS[]
DJANGO_CORS_ALLOWED_ORIGIN_REGEXESList of origins allowed for CORS using regulair expressions[]
DJANGO_CORS_ALLOW_ALL_ORIGINSAllow all CORS originsfalse
DJANGO_CSRF_TRUSTED_ORIGINSCSRF trusted origins[]
DJANGO_EMAIL_BACKENDEmail backend librarydjango.core.mail.backends.smtp.EmailBackend
DJANGO_EMAIL_BRAND_NAMEBrand name for email
DJANGO_EMAIL_FROMEmail address used as sender[email protected]
DJANGO_EMAIL_HOSTHostname of email
DJANGO_EMAIL_HOST_PASSWORDPassword to authenticate with on the email host
DJANGO_EMAIL_HOST_USERUser to authenticate with on the email host
DJANGO_EMAIL_LOGO_IMGLogo for the email
DJANGO_EMAIL_PORTPort used to connect to email host
DJANGO_EMAIL_URL_APPUrl used in the email to go to the app
DJANGO_EMAIL_USE_SSLUse ssl for email host connectionfalse
DJANGO_EMAIL_USE_TLSUse tls for email host connectionfalse
DJANGO_SECRET_KEYSecret key
DJANGO_SERVER_TO_SERVER_API_TOKENS[]
DOCSPEC_API_URLURL to endpoint of DocSpec conversion API
DOCUMENT_IMAGE_MAX_SIZEMaximum size of document in bytes10485760
FRONTEND_CSS_URLTo add a external css file to the app
FRONTEND_JS_URLTo add a external js file to the app
FRONTEND_HOMEPAGE_FEATURE_ENABLEDFrontend feature flag to display the homepagefalse
FRONTEND_THEMEFrontend theme to use
LANGUAGE_CODEDefault languageen-us
LANGFUSE_SECRET_KEYThe Langfuse secret key used by the sdkNone
LANGFUSE_PUBLIC_KEYThe Langfuse public key used by the sdkNone
LANGFUSE_BASE_URLThe Langfuse base url used by the sdkNone
LASUITE_MARKETING_BACKENDBackend used when SIGNUP_NEW_USER_TO_MARKETING_EMAIL is True. See https://github.com/suitenumerique/django-lasuite/blob/main/documentation/how-to-use-marketing-backend.mdlasuite.marketing.backends.dummy.DummyBackend
LASUITE_MARKETING_PARAMETERSThe parameters to configure LASUITE_MARKETING_BACKEND. See https://github.com/suitenumerique/django-lasuite/blob/main/documentation/how-to-use-marketing-backend.md{}
LOGGING_LEVEL_LOGGERS_APPApplication logging level. options are "DEBUG", "INFO", "WARN", "ERROR", "CRITICAL"INFO
LOGGING_LEVEL_LOGGERS_ROOTDefault logging level. options are "DEBUG", "INFO", "WARN", "ERROR", "CRITICAL"INFO
LOGIN_REDIRECT_URLLogin redirect url
LOGIN_REDIRECT_URL_FAILURELogin redirect url on failure
LOGOUT_REDIRECT_URLLogout redirect url
MALWARE_DETECTION_BACKENDThe malware detection backend use from the django-lasuite packagelasuite.malware_detection.backends.dummy.DummyBackend
MALWARE_DETECTION_PARAMETERSA dict containing all the parameters to initiate the malware detection backend{"callback_path": "core.malware_detection.malware_detection_callback",}
MEDIA_BASE_URL
MEDIA_AUTH_ORIGINAL_URL_HEADERParameter containing the original request URL, as seen at the media auth endpoint, in CGI/WSGI form (HTTP_HEADER_NAME_ALL_CAPS_WITH_UNDERSCORES)HTTP_X_ORIGINAL_URL
NO_WEBSOCKET_CACHE_TIMEOUTCache used to store current editor session key when only users without websocket are editing a document120
OIDC_ALLOW_DUPLICATE_EMAILSAllow duplicate emailsfalse
OIDC_AUTH_REQUEST_EXTRA_PARAMSOIDC extra auth parameters{}
OIDC_CREATE_USERCreate used on OIDCfalse
OIDC_FALLBACK_TO_EMAIL_FOR_IDENTIFICATIONFallback to email for identificationtrue
OIDC_OP_AUTHORIZATION_ENDPOINTAuthorization endpoint for OIDC
OIDC_OP_JWKS_ENDPOINTJWKS endpoint for OIDC
OIDC_OP_LOGOUT_ENDPOINTLogout endpoint for OIDC
OIDC_OP_TOKEN_ENDPOINTToken endpoint for OIDC
OIDC_OP_USER_ENDPOINTUser endpoint for OIDC
OIDC_REDIRECT_ALLOWED_HOSTSAllowed hosts for OIDC redirect url[]
OIDC_REDIRECT_REQUIRE_HTTPSRequire https for OIDC redirect urlfalse
OIDC_RP_CLIENT_IDClient id used for OIDCimpress
OIDC_RP_CLIENT_SECRETClient secret used for OIDC
OIDC_RP_SCOPESScopes requested for OIDCopenid email
OIDC_RP_SIGN_ALGOverification algorithm used OIDC tokensRS256
OIDC_STORE_ID_TOKENStore OIDC tokentrue
OIDC_STORE_ACCESS_TOKENIf True stores OIDC access token in session.false
OIDC_STORE_REFRESH_TOKENIf True stores OIDC refresh token in session.false
OIDC_STORE_REFRESH_TOKEN_KEYKey to encrypt refresh token stored in session, must be a valid Fernet key
OIDC_USERINFO_FULLNAME_FIELDSOIDC token claims to create full name["first_name", "last_name"]
OIDC_USERINFO_SHORTNAME_FIELDOIDC token claims to create shortnamefirst_name
OIDC_USE_NONCEUse nonce for OIDCtrue
POSTHOG_KEYPosthog key for analytics
REDIS_URLCache urlredis://redis:6379/1
SEARCH_INDEXER_BATCH_SIZESize of each batch for indexation of all documents100000
SEARCH_INDEXER_CLASSClass of the backend for document indexation & search
SEARCH_INDEXER_COUNTDOWNMinimum debounce delay of indexation jobs (in seconds)1
SEARCH_INDEXER_QUERY_LIMITMaximum number of results expected from search endpoint50
SEARCH_URLFind application endpoint for search queries
SEARCH_INDEXER_SECRETToken required for indexation queries
INDEXING_URLFind application endpoint for indexation
SENTRY_DSNSentry host
SESSION_COOKIE_AGEduration of the cookie session606012
SIGNUP_NEW_USER_TO_MARKETING_EMAILRegister new user to the marketing onboarding. If True, see env LASUITE_MARKETING_* systemFalse
SPECTACULAR_SETTINGS_ENABLE_DJANGO_DEPLOY_CHECKfalse
STORAGES_STATICFILES_BACKENDwhitenoise.storage.CompressedManifestStaticFilesStorage
THEME_CUSTOMIZATION_CACHE_TIMEOUTCache duration for the customization settings86400
THEME_CUSTOMIZATION_FILE_PATHFull path to the file customizing the theme. An example is provided in src/backend/impress/configuration/theme/default.jsonBASE_DIR/impress/configuration/theme/default.json
TRASHBIN_CUTOFF_DAYSTrashbin cutoff30
USER_OIDC_ESSENTIAL_CLAIMSEssential claims in OIDC token[]
USER_ONBOARDING_DOCUMENTSA list of documents IDs for which a read-only access will be created for new s[]
USER_ONBOARDING_SANDBOX_DOCUMENTID of a template sandbox document that will be duplicated for new users
USER_RECONCILIATION_FORM_URLURL of a third-party form for user reconciliation requests
Y_PROVIDER_API_BASE_URLY Provider url
Y_PROVIDER_API_KEYY provider API key

impress-frontend image

These are the environment variables you can set to build the impress-frontend image.

Depending on how you are building the front-end application, this variable is used in different ways.

If you want to build the Docker image, this variable is used as an argument in the build command.

Example:

bash
docker build -f src/frontend/Dockerfile --target frontend-production --build-arg PUBLISH_AS_MIT=false docs-frontend:latest

If you want to build the front-end application using the yarn build command, you can edit the file src/frontend/apps/impress/.env with the NODE_ENV=production environment variable and modify it. Alternatively, you can use the listed environment variables with the prefix NEXT_PUBLIC_ (for example, NEXT_PUBLIC_PUBLISH_AS_MIT=false).

Example:

bash
cd src/frontend/apps/impress
NODE_ENV=production NEXT_PUBLIC_PUBLISH_AS_MIT=false yarn build
OptionDescriptiondefault
API_ORIGINbackend domain - it uses the current domain if not initialized
SW_DEACTIVATEDTo not install the service worker
PUBLISH_AS_MITRemoves packages whose licences are incompatible with the MIT licence (see below)true

Packages with licences incompatible with the MIT licence:

  • xl-docx-exporter: GPL,
  • xl-pdf-exporter: GPL,
  • xl-multi-column: GPL.

In .env.development, PUBLISH_AS_MIT is set to false, allowing developers to test Docs with all its features.

⚠️ If you run Docs in production with PUBLISH_AS_MIT set to false make sure you fulfill your BlockNote licensing or subscription obligations.