Server configuration
Core Corteza services are configured via the environment (.env
) file.
It allows a quick deploy to another platform, along with fine-tuning the system’s behaviour and enabled features.
The |
.env
file affects three levels:-
Implicit Docker Compose configuration,
-
variable substitution in Docker configuration,
-
service configuration.
When you are using Docker Compose, you must explicitly reference the environment file for each service in the |
You can use variables defined in the |
Base configuration
These variables control the base Corteza configurations, such as the port and the database DSN.
Type | Default value | Description |
---|---|---|
DB_DSN |
||
|
corteza:corteza@tcp(db:3306)/corteza?collation=utf8mb4_general_ci |
Database connection string <username>:<password>@(<host>:<port>)/<dbname>?collation=utf8mb4_general_ci |
DB_MAX_TRIES |
||
|
100 |
Maximum number of connection retries. |
DB_CONN_ERR_DELAY |
||
|
5 seconds |
Duration between database connection retries. |
DB_CONN_TIMEOUT |
||
|
1 minute |
After how long we should give up on connecting with the database. |
GRPC_SERVER_NETWORK |
||
|
tcp |
Network to use for gRPC. |
GRPC_SERVER_ADDR |
||
|
:50051 |
Where do we listen for gRPC connections. |
GRPC_CLIENT_BACKOFF_DELAY |
||
|
1 minute |
Maximum delay for backoff on connection. |
HTTP_ADDR |
||
|
:80 |
IP and port for the HTTP server. |
HTTP_METRICS |
||
|
false |
Enable (prometheus) metrics. |
HTTP_METRICS_NAME |
||
|
corteza |
Name for metrics endpoint. |
HTTP_METRICS_USERNAME |
||
|
metrics |
Username for the metrics endpoint. |
HTTP_METRICS_PASSWORD |
||
|
(random) |
Password for the metrics endpoint. |
HTTP_CLIENT_TIMEOUT |
||
|
30 seconds |
Default timeout for clients. |
MONITOR_INTERVAL |
||
|
5 minutes |
Output (log) interval for monitoring. |
STORAGE_PATH |
||
|
var/store |
Where do we store uploaded files |
Security
These variables control security aspects of Corteza, such as the JWT token secret and the token lifetime.
Type | Default value | Description | ||
---|---|---|---|---|
AUTH_JWT_SECRET |
||||
|
(random) |
Secret used for signing JWT tokens.
|
||
AUTH_JWT_EXPIRY |
||||
|
1 month |
Expiration time for the auth JWT tokens. |
||
HTTP_CLIENT_TSL_INSECURE |
||||
|
false |
Allow insecure (invalid, expired TSL/SSL certificates) connections.
|
Provisioning
Provisioning allows you to configure a Corteza instance when deployed. It occurs automatically after the Corteza server starts.
We recommend you to keep provisioning enabled as it simplifies version updates by updating the database and updating settings. If you’re doing local development or some debugging, you can disable this. |
Type | Default value | Description |
---|---|---|
PROVISION_ALWAYS |
||
|
true |
Controls if the provisioning should run when the server starts. |
UPGRADE_ALWAYS |
||
|
true |
Controls if the upgradable systems should be upgraded when the server starts. |
Provision authentication settings
Key | Type | Default value | Description |
---|---|---|---|
PROVISION_SETTINGS_AUTH_EXTERNAL_ENABLED |
|||
|
|
true |
Is OAuth2 enabled or disabled. |
PROVISION_SETTINGS_AUTH_EXTERNAL_REDIRECT_URL |
|||
|
|
searches env-variables ( |
|
PROVISION_SETTINGS_AUTH_EXTERNAL_SESSION_STORE_SECRET |
|||
|
|
random 64 char string |
generated 64 char long string if missing. Is session cookie "secure" flag used (if yes, cookie can only be access over HTTPS). |
PROVISION_SETTINGS_AUTH_EXTERNAL_SESSION_STORE_SECURE |
|||
|
|
false |
If HTTPS is used for external auth redirection url, value is set to true. |
PROVISION_SETTINGS_AUTH_FRONTEND_URL_BASE |
|||
|
|
Where the frontend SPA is located. Serves as base for generating other |
|
PROVISION_SETTINGS_AUTH_FRONTEND_URL_PASSWORD_RESET |
|||
|
|
Where the frontend SPA is located, the password reset form. |
|
PROVISION_SETTINGS_AUTH_FRONTEND_URL_EMAIL_CONFIRMATION |
|||
|
|
Where the frontend SPA is located, password email confirmation page.
|
|
PROVISION_SETTINGS_AUTH_FRONTEND_URL_REDIRECT |
|||
|
|
Where the frontend SPA is located.
User will be redirected here on successful external authentication.
Auto discovery uses |
|
PROVISION_SETTINGS_AUTH_EMAIL_FROM_ADDRESS |
|||
|
|
Email address used for sending auth emails (password reset, email confirmation). Name used for sending auth emails (password reset, email confirmation). |
|
PROVISION_SETTINGS_AUTH_EMAIL_FROM_NAME |
|||
|
|
Corteza Team (to-be-configured) |
The email from parameter. |
PROVISION_SETTINGS_AUTH_INTERNAL_ENABLED |
|||
|
|
true |
Controls if users are allowed to use internal authentication features, such as login, sign-up, and password reset. |
PROVISION_SETTINGS_AUTH_INTERNAL_SIGNUP_ENABLED |
|||
|
|
true |
Controls if users are allowed to ue internal authentication sign-up. |
PROVISION_SETTINGS_AUTH_INTERNAL_SIGNUP_EMAIL_CONFIRMATION_REQUIRED |
|||
|
|
false |
Controls if users are required to confirm the email?
Enabled on auto-discovery if server has email capabilities ( |
PROVISION_SETTINGS_AUTH_INTERNAL_PASSWORD_RESET_ENABLED |
|||
|
|
false |
Controls if suers are allowed to use password reset for accounts created via internal sign-up. |
Provision OIDC providers
Type | Default value | Description |
---|---|---|
PROVISION_OIDC_PROVIDER |
||
|
Registers available providers from a list of space delimited provided pairs ( The provider is auto-discovered only if it does not exist (match by name). Also, make sure that your redirect URL ( |
|
PROVISION_SETTINGS_AUTH_EXTERNAL_REDIRECT_URL |
||
|
Sets value for This should be set to |
Provision other external provider
Type | Default value | Description |
---|---|---|
PROVISION_SETTINGS_AUTH_EXTERNAL_GITHUB |
||
|
Github’s app credentials: |
|
PROVISION_SETTINGS_AUTH_EXTERNAL_FACEBOOK |
||
|
Facebook’s app credentials: |
|
PROVISION_SETTINGS_AUTH_EXTERNAL_GOOGLE |
||
|
Google’s app credentials: |
|
PROVISION_SETTINGS_AUTH_EXTERNAL_LINKEDIN |
||
|
LinkedIn’s app credentials: |
|
PROVISION_SETTINGS_AUTH_EXTERNAL_OIDC |
||
|
OIDC provider settings |
SMTP
Type | Default value | Description |
---|---|---|
SMTP_HOST |
||
|
localhost:25 |
The SMTP server hostname. |
SMTP_PORT |
||
|
The SMTP post. |
|
SMTP_USER |
||
|
The SMTP username. |
|
SMTP_PASS |
||
|
The SMTP password. |
|
SMTP_FROM |
||
|
The |
Corredor
Type | Default value | Description |
---|---|---|
CORREDOR_ENABLED |
||
|
true |
Enable/disable Corredor integration. |
CORREDOR_ADDR |
||
|
corredor:80 |
Hostname and port of the Corredor gRPC server. |
CORREDOR_MAX_BACKOFF_DELAY |
||
|
1 minute |
Max delay for backoff on connection. |
CORREDOR_MAX_RECEIVE_MESSAGE_SIZE |
||
int |
16MB |
|
CORREDOR_DEFAULT_EXEC_TIMEOUT |
||
time |
1 minute |
|
CORREDOR_LIST_TIMEOUT |
||
duration |
2 second |
|
CORREDOR_LIST_REFRESH |
||
duration |
2 second |
|
CORREDOR_RUN_AS_ENABLED |
||
bool |
false |
|
CORREDOR_CLIENT_CERTIFICATES_ENABLED |
||
bool |
false |
|
CORREDOR_CLIENT_CERTIFICATES_PATH |
||
string |
/certs/corredor/client |
|
CORREDOR_CLIENT_CERTIFICATES_CA |
||
string |
ca.crt |
|
CORREDOR_CLIENT_CERTIFICATES_PUBLIC |
||
string |
public.crt |
|
CORREDOR_CLIENT_CERTIFICATES_PRIVATE |
||
string |
private.key |
|
CORREDOR_CLIENT_CERTIFICATES_SERVER_NAME |
||
string |
"" |
MinIO
The MinIO integration allows you to replace local storage with cloud storage.
When configured, |
Type | Default value | Description |
---|---|---|
MINIO_ENDPOINT |
||
|
||
MINIO_SECURE |
||
|
true |
|
MINIO_ACCESS_KEY |
||
|
||
MINIO_SECRET_KEY |
||
|
||
MINIO_SSEC_KEY |
||
|
||
MINIO_BUCKET |
||
|
||
MINIO_STRICT |
||
|
false |
Debugging
These parameters help in the development and testing process. When you are deploying to production, these should be disabled to improve performance and reduce storage usage. You should configure external services such as Sentry or ELK to keep track of logs and error reports. |
Sentry
Type | Default value | Description |
---|---|---|
SENTRY_DSN |
||
|
Set to enable Sentry client. |
|
SENTRY_DEBUG |
||
|
false |
Print out debugging information. |
SENTRY_ATTACH_STACKTRACE |
||
|
false |
Attach stacktraces. |
SENTRY_SAMPLE_RATE |
||
|
Sample rate for event submission (0.0 - 1.0, defaults to 1.0). |
|
SENTRY_MAX_BREADCRUMBS |
||
|
Maximum number of breadcrumbs. |
|
SENTRY_SERVERNAME |
||
|
Set reported Server name. |
|
SENTRY_RELEASE |
||
|
(current version) |
Set reported Release. |
SENTRY_DIST |
||
|
Set reported distribution. |
|
SENTRY_ENVIRONMENT |
||
|
Set reported environment. |
Logging
Type | Default value | Description |
---|---|---|
DB_LOGGER |
||
|
false |
Log SQL queries. |
CORREDOR_LOG_ENABLED |
||
|
false |
Log communication with Corredor. |
HTTP_REPORT_PANIC |
||
|
true |
Report HTTP panic to Sentry. |
HTTP_LOG_REQUEST |
||
|
false |
Log HTTP requests. |
HTTP_LOG_RESPONSE |
||
|
false |
Log HTTP responses. |
HTTP_ENABLE_VERSION_ROUTE |
||
|
false |
Enable |
HTTP_ENABLE_DEBUG_ROUTE |
||
|
false |
Enable |
GRPC_CLIENT_LOG |
||
|
false |
Log gRPC communication. |
Delaying API execution
You can configure these options to defer API execution until another external (HTTP) service is up and running.
Delaying API execution can come in handy in complex setups where execution order is important. |
Type | Default value | Description |
---|---|---|
WAIT_FOR |
||
|
0 |
Delays API startup for the amount of time specified (10s, 2m…). This delay happens before service (WAIT_FOR_SERVICES) probing. |
WAIT_FOR_STATUS_PAGE |
||
|
true |
Show temporary status web page. |
WAIT_FOR_SERVICES |
||
|
Space delimited list of hosts and/or URLs to probe.
Host format: Services are probed in parallel. |
|
WAIT_FOR_SERVICES_TIMEOUT |
||
|
1m |
Max time for each service probe. |
WAIT_FOR_SERVICES_PROBE_TIMEOUT |
||
|
30s |
Timeout for each service probe. |
WAIT_FOR_SERVICES_PROBE_INTERVAL |
||
|
5s |
Interval between service probes. |