On-Premise Setup Guide¶
Container Runtime Engine¶
We distribute the images from docker build step which generates the final container images for frontend, backend and db migration. Although they are OCI-compliant images, we have only tested with docker container runtime. Which means that it might be possible to use these images with other container runtimes (containerd, etc.) but they were not tested, so we can't guarantee that it would run without issue on those container runtimes.
This documentation contains docker cli, assuming that you are using docker engine.
Environment Variables¶
-
For the frontend container, we need these variables to be set:
Variable Description CI_ENVIRONMENT_SLUG Current environment, mainly used for logging DEFAULT_STORAGE_SIZE_LIMIT_IN_BYTES Default storage size limit for storing the uploaded images (in bytes) JWT_PAT_SECRET_KEY Secret key to encode and decode JWT personal access token JWT_SECRET_KEY Secret key to encode and decode JWT auth access token ORIGIN Origin URL of the application PUBLIC_COMMIT_HASH Commit hash used to build the application PUBLIC_COOKIE_DOMAIN Cookie domain of the application. Allows for different configuration of domain names, for example subdomains PUBLIC_ENDPOINT URL of the app's backend endpoint PUBLIC_INTERNAL_ENDPOINT Internal (private) URL of the app's backend endpoint. This application uses a backend for frontend architecture and SSR, meaning that the frontend has it's own backend. This URL points the backend of the frontend to the API backend when in the private network. PUBLIC_MAX_FILE_UPLOAD_SIZE_MiB Max file size allowed to upload (in MiB) PUBLIC_VERSION_STRING Version string shown for frontend and backend OTEL_USE_GRPC Use OTLP/GRPC instead of OTLP/HTTP (Protobuf) as an exporter protocol for OpenTelemetry. Defaults to false, if it's not setOTEL_OTLP_ENDPOINT Set the OpenTelemetry exporter endpoint URL (with port number) to push the observability data PUBLIC_GRAFANA_FARO_COLLECTOR_URL For frontend observability, if you plan to use Grafana Faro, set the collector URL generated from Grafana settings page PUBLIC_GRAFANA_FARO_SAMPLING_RATE Set the sampling rate for Grafana Faro, decimal value between 0 and 1. Defaults to 1, if it's not set -
And for backend container(s), we need these variables to be set:
Variable Description CI_ENVIRONMENT_SLUG Current environment, mainly used for logging DEFAULT_STORAGE_SIZE_LIMIT_IN_BYTES Default storage size limit for storing the uploaded images (in bytes) EMAIL_SENDER Source email address for sending out email EMAIL_TOKEN_EXPIRY_DURATION_SECS Duration of validity of any tokens sent by email JWT_PAT_SECRET_KEY Secret key to decode JWT personal access token JWT_SECRET_KEY Secret key to decode JWT auth access token ORIGIN Origin URL of the application POSTGRES_CONNECTION_STRING Connection string for the app to connect to the database in the format of Server=<db-instance-hostname-or-ip>;Database=<db-name>;Port=<db-port>;Userid=<db-user>;Password=<db-password>PUBLIC_COMMIT_HASH Commit hash used to build the application PUBLIC_COOKIE_DOMAIN Cookie domain of the application. Allows for different configuration of domain names, for example subdomains PUBLIC_MAX_FILE_UPLOAD_SIZE_MiB Max file size allowed to upload (in MiB) PUBLIC_VERSION_STRING Version string shown for frontend and backend S3_BUCKET If STORAGE_MODEis s3, then this points to the s3 bucket to store the uploaded filesSTORAGE_MODE Set the storage to either s3,local(filesystem) orazure(blob storage)VERIFY_EMAIL_TOKEN_EXPIRY_DURATION_SECS Duration of validity of email verification token EMAIL_SERVICE_PROVIDER Set the email service to be used to send out emails. Currently accepts SESorSMTPSMTP_HOST If EMAIL_SERVICE_PROVIDERis SMTP, then set this variable to the SMTP hostname or domainSMTP_USERNAME If EMAIL_SERVICE_PROVIDERis SMTP, then set this variable to the SMTP usernameSMTP_PASSWORD If EMAIL_SERVICE_PROVIDERis SMTP, then set this variable to the SMTP password for the given usernameSMTP_PORT If EMAIL_SERVICE_PROVIDERis SMTP, then set this variable to the SMTP port to connect. Defaults to587if it's not setSMTP_INSECURE_CONNECTION If EMAIL_SERVICE_PROVIDERis SMTP, then set this variable totrueorfalse. Defaults tofalseif it's not setDEV_ACCOUNT_EMAIL Dev account to be seeded for the first time into the database. If the email already exists, then that account will be upgraded to a dev account OTEL_USE_GRPC Use OTLP/GRPC instead of OTLP/HTTP (Protobuf) as an exporter protocol for OpenTelemetry. Defaults to false, if it's not setOTEL_OTLP_ENDPOINT Set the OpenTelemetry exporter endpoint URL (with port number) to push the observability data -
For the migration container image, set the following variables:
Variable Description POSTGRES_HOST Hostname or IP address of the database instance POSTGRES_PASSWORD Password to connect to the database instance POSTGRES_USERNAME Username to connect to the database instance
Start The Container¶
You can either use simple docker command to run the frontend, backend and migration containers and pass the environment variables, or write your own docker-compose.yml (refer to this doc) and use docker compose cli