Configuration
Configuration Files
Sukarix is configured via .ini files by default, allowing for clear and manageable settings. The configuration load
order ensures that settings can be overridden based on the environment.
Configuration Load Order
-
Base Configuration:
config/classes.iniconfig/default.ini
-
Additional Configurations:
- Files listed in the
CONFIGSvariable, e.g.,smtp,notifications,upload. No need to add.iniextension. config/validation.ini(loaded only when a data validation request is initiated).
- Files listed in the
-
Environment-Specific Configuration:
config/config-<environment>.ini
-
Routing and Access Control:
config/routes.iniconfig/routes-<environment>.iniconfig/access.iniorconfig/access-cli.ini(based on environment).
Note
Dynamic reconfiguration
Configuration changes are automatically reloaded, meaning there is no need to restart any service.
Tip
Automatic .ini Extension Handling
When specifying additional configuration files in the
CONFIGSvariable, you do not need to include the.iniextension. Sukarix will automatically append.inito the file name during the loading process. For example, if you setCONFIGS=notifications,smtp,upload, Sukarix will loadconfig/notifications.ini,config/smtp.ini, andconfig/upload.ini.
Environment Overrides
Any configuration setting can be overridden in the environment-specific .ini file (config/config-<environment>.ini).
This allows for tailored configurations depending on whether the application is in development, testing, or production.
Default Configuration Example
Here is an overview of the default settings found in default.ini:
-
Global Settings:
DEBUG: Stack trace verbosity.PACKAGE: Display name in requests.LOGS: Custom log location.TEMP: Temporary folder for cache and compiled templates.UPLOADS: Directory for file uploads.UI: Paths for user interface files.LOCALES: Location of language dictionaries.ENCODING: Default character encoding.LANGUAGE: Active language.FALLBACK: Fallback language.
-
Cache and Minification:
CACHE: Cache configuration.SEED: Cache seed.MINIFY_JSandMINIFY_CSS: Toggle minification.
-
Timezone and Environment:
TZ: Timezone setting.application.environment: Current environment.log.session: Log session queries.session.table: Table for session storage.pagination.limit: Default pagination limit.template.default: Default view to render.log.keep: Log retention period.server.host: Host for command-line actions.error.channel: Error notification channel.
-
Security:
csrf.enabled: Enable or disable CSRF protection.csrf.expiry: CSRF token expiry time in seconds.