Skip to main content
Version: v0.2.6

Environment variables

The following variables are required by colibri.InitializeApp():

VariableValues
ENVIRONMENTdevelopment, test, sandbox, production
APP_NAMENon-empty string
APP_TYPEservice, serverless, cli
CLOUDnone, aws, gcp, firebase

Common optional variables include PORT (8080), LOG_LEVEL (info), and WAIT_GROUP_TIMEOUT_SECONDS (90).

Module configuration:

  • OpenTelemetry: OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, OTEL_SERVICE_NAME, OTEL_TRACES_ENABLED (true), OTEL_METRICS_ENABLED (true), OTEL_METRICS_PROMETHEUS_ENABLED (true);
  • PostgreSQL: SQL_DB_HOST, SQL_DB_PORT, SQL_DB_NAME, SQL_DB_USER, SQL_DB_PASSWORD, SQL_DB_SSL_MODE, pool and migration variables;
  • Redis: CACHE_URI, CACHE_PASSWORD;
  • messaging: COLIBRI_MESSAGING, RABBITMQ_URL;
  • cloud: CLOUD_HOST, CLOUD_REGION, CLOUD_SECRET, CLOUD_TOKEN, CLOUD_AWS_ROLE_ARN;
  • CORS: CORS_ALLOW_ORIGINS, CORS_ALLOW_METHODS, CORS_ALLOW_HEADERS, CORS_EXPOSE_HEADERS, CORS_ALLOW_CREDENTIALS, CORS_MAX_AGE.

The OTEL_*_ENABLED variables accept Go boolean values such as true, false, 1, and 0; an invalid value stops initialization. Their combinations are described in Observability.

CLOUD_DISABLE_SSL is deprecated and has no effect since v0.2.4: the scheme comes from CLOUD_HOST, such as http://localhost:4566. In sandbox and production, AWS integrations use the default credential chain of the AWS SDK for Go v2; in development and test, they use CLOUD_HOST, CLOUD_REGION, CLOUD_SECRET, and CLOUD_TOKEN to target an emulator such as LocalStack.

Do not commit real credentials to .env.