Configuration

Medkey can be configured via .env file, located in the root application directory.

Also there available two sample files of .env:

  • .env.prod — production environment sample file;

  • .env.dev — development environment sample file.

Each param at .env file must start from new line.

.env parameters reference

APP_ENV

Describe application environment. Can be one of two values:

  • prod — production environment

  • dev — development environment

In production environment disabled debug errors output, disabled page error output (using web error page with call stack trace).

APP_DEBUG

Can be true or false. If true — you can see on page Yii2 debug panel.

For production must be false.

APP_DB_CONNECTION

Can be one of two values:

  • pgsql — will be used PostgreSQL driver;

  • mysql — will be used MySQL/MariaDB driver.

APP_DB_HOST

Hostname of database server. Can be

  • IPv4 address (for example 127.0.0.1);

  • URL (for example localhost).

For PostgreSQL you can set your database cluster host. By default for local installation of PostgreSQL it is 127.0.0.1.

APP_DB_PORT

Port of your database cluster (for PostgreSQL) or server (for MySQL).

By default for PostgreSQL main cluster port value is 5432.

APP_DB_NAME

Database name for your application. Must be created before setting.

APP_DB_USERNAME

You database username, which will be used for all application to database connections.

APP_DB_PASSWORD

Your database username password.

SUPER_LOGIN

Application superuser login. It will have all permissions inside application.

SUPER_PASSWORD

Application superuser login. It will have all permissions inside application.

APP_TYPE_KEY

Application supports two types of database records identifiers: biginteger and UUID. Value can be:

  • bigint — for biginteger type;

  • uuid — for UUID (GUID) identifiers type.

Must be set before database migrations installation, cannot be changed on deployed application instance.

We recommend to use biginteger identifiers.

WIDGET_LOADER_URL

URI with starting slash of widget loader. By default use /ui/widget-loader/factory.

Can be changed only in development purposes. For production use default value.

APP_TITLE

Application title, which used at the top side of menu and at login form. Can be overwritted by parameter set in user interface.

You can set here any line of text you want to see in your UI.

JOB_TIMEOUT

Timeout for background workers. By default 1200, but can be increased.

AUTH_WITH_EMPLOYEE

Can be true or false. If you want to disable login users without employee record — set value to false (production value).

If you have service users without employee records — set this value to true to enable their authentication ability.

LANGUAGE

Default application language. Can be overriden by default language param, which can be set at UI. It will be used for all users, which haven't set their personally preferred language.

Value can be:

  • ru - for russian language;

  • en - for english language.