Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

Environmental variables

Ondrej Rafaj edited this page Nov 20, 2021 · 16 revisions

Variables

Server

Login

  • APICORE_AUTH_ALLOW_LOGIN - boolean, optional
  • APICORE_AUTH_ALLOW_REGISTRATIONS - boolean, optional
  • APICORE_AUTH_REGISTRATION_DOMAINS - string, optional (comma separated)
  • APICORE_AUTH_ALLOW_INVITATIONS - boolean, optional
  • APICORE_AUTH_INVITATION_DOMAINS - string, optional (comma separated)

Security

Database

Emailing

S3 file storage

Github authentication

Github authentication

Server

APICORE_SERVER_NAME

Name of the server; used mainly to identify server as a whole in frontend applications

Available in /info

APICORE_SERVER_URL

Full url of the API sever (ex. https://api.string.cz/); Used to generate links in API endpoints

Available in /info

APICORE_SERVER_INTERFACE

Full url of a frontend interface (ex. https://appstore.string.cz/); Used to generate links in API endpoints

Available in /info

APICORE_SERVER_PATH_PREFIX

(Optional) In some cases API and a web app can be configured to work on the same endpoint, just separate virtual path (ex. with NGINX). This will allow you to specify that the root of your API is in a subfolder.

For example: Web: https://appstore.example.com API: https://appstore.example.com/api

The value of the variable would be api in the above case

APICORE_SERVER_MAX_UPLOAD_FILESIZE

Maximum file upload file size in Mb, default is 50, recommended 800

APICORE_JWT_SECRET

Default value is secret which will cause application to crash in production mode. Please set a secure random string to this variable to ensure your signing JWT tokens won't be open to exploitation

Database

APICORE_DATABASE_HOST

PostgreSQL database host url

APICORE_DATABASE_PORT

Default 5432. PostgreSQL database port

APICORE_DATABASE_DATABASE

PostgreSQL database name

APICORE_DATABASE_USER

PostgreSQL database user

APICORE_DATABASE_PASSWORD

PostgreSQL database password

APICORE_DATABASE_LOGGING

Default false. Enable logging of all SQL queries into the command line

Emailing

APICORE_MAIL_EMAIL

Sender email for all email communication originating from the server (forgotten password, registrations, etc). (ex. no-reply@example.com)

APICORE_MAIL_MAILGUN_DOMAIN

Domain name from your Mailgun account (SMTP will be supported later)

APICORE_MAIL_MAILGUN_KEY

API key from your Mailgun account

S3 file storage

APICORE_STORAGE_S3_ENABLED

Enable S3 storage for your files; if disabled (default setting), local storage will be used instead

APICORE_STORAGE_S3_BUCKET

S3 bucket name

APICORE_STORAGE_S3_REGION

S3 region (ex. eu-central-1)

APICORE_STORAGE_S3_ACCESS_KEY

S3 access key

APICORE_STORAGE_S3_SECRET_KEY

S3 secret key

Github authentication

APICORE_AUTH_GITHUB_ENABLED

Default false. Enable Github authentication

Available in /info

APICORE_AUTH_GITHUB_CLIENT

Github oAuth app client ID

APICORE_AUTH_GITHUB_SECRET

Github oAuth app secret

APICORE_AUTH_GITHUB_HOST

Default https://github.com. Used to initiate the login process

APICORE_AUTH_GITHUB_API

Default https://api.github.com. Used to retrieve user info after successful authentication

APICORE_AUTH_GITHUB_TEAMS

Optional. Coma separated list, of server-wide Github organisations, allowed to login using Github.

Gitlab authentication

APICORE_AUTH_GITLAB_ENABLED

Default false. Enable Gitlab authentication

Available in /info

APICORE_AUTH_GITLAB_APPLICATION

Application identifier

APICORE_AUTH_GITLAB_SECRET

Application secret

APICORE_AUTH_GITLAB_HOST

URL of the authentication server; Default if https://gitlab.com

APICORE_AUTH_GITHUB_API

URL of the API server; Default if https://gitlab.com/api/v4

APICORE_AUTH_GITLAB_GROUPS

Reserved, currently not in use

Example: Apple,Einstore,manGoweb,LiveUI

Further settings will be available at the Team level in the Einstore admin panel