PhraseApp Enterprise Environment Variables

All configuration is done via the setting of environment variables inside the phraseapp.env file. An example file with arbitrary values could look similar to this purely illustrative file. 192.168.99.100 should be replaced by your actually used host names or IPs reachable from the Docker container running PhraseApp Enterprise. Also, make sure to replace the secrets at the end of the file according to the section about SECRETs at the end of this document:

DATABASE_URL=mysql2://root@192.168.99.100:3306/phraseapp?local_infile=1

ELASTIC_SEARCH_URL=http://192.168.99.100:9200

REDIS_URL=redis://192.168.99.100:6379

BASE_URL=http://192.168.99.100:8080
CUSTOM_ASSET_HOST=http://192.168.99.100:8080

MAIL_RAISE_DELIVERY_ERRORS=0
MAIL_ADDRESS=192.168.99.100
MAIL_PORT=1025
MAIL_ENABLE_STARTTLS_AUTO=0
MAIL_USER_NAME=
MAIL_PASSWORD=
MAIL_AUTHENTICATION=plain
MAIL_DEFAULT_SENDER_ADDRESS=phraseapp@mycompany.tld
MAIL_DOMAIN=mycompany.tld

SIGNUPS_DISABLED=0

RAILS_APP_OAUTH_ACCESS_TOKEN_SECRET=uo7peejia8peceeng4iete[...]
RAILS_APP_SECRET_TOKEN=ePeiPhai1hie9mahxil5ushie6cua1ahkae[...]
RAILS_APP_SECRET_KEY_BASE=rei5ohXocu2Biesiew4oFoTi1elohthi[...]
DEVISE_SECRET_KEY=Doh1iekeeshu0uzah8so8Iethohzaiv1ohvauze3[...]
DB_ENCRYPTION_SECRET=yei3Iey0eith5iep0Shohthech9mahNaip0Ph[...]

This file may not contain double-quotes “ - do not enclose string values with any quotes. See docker documentation for more on Environment variable settings.

Environment Variables

Database

Setting Description
DATABASE_URL The Database URL to connect to, e.g. mysql2://user:pass@db-host:port/db?local_infile=true. You must set the scheme to the pseudo-scheme mysql2 for the Ruby application of PhraseApp Enterprise to be able to connect to your MySQL server. User and pass must be url-encoded with the [Percent-encoding](https://en.wikipedia.org/wiki/Percent-encoding).

elasticsearch

Setting Description
ELASTIC_SEARCH_URL The URL of the Elasticsearch cluster to connect to, e.g. http://es-host:9200

Redis

Setting Description
REDIS_URL The URL of the Redis key-value store to connect to with the scheme "redis", e.g. redis://redis-host:6379

Domain settings

Setting Description
BASE_URL Hostname used for links in emails e.g. https://phraseapp.mycompany.com
CUSTOM_ASSET_HOST URL used for linked assets, such as images if you're employing static asset host like a CDN. You can always also use the same value as for BASE_URL, e.g. https://phraseapp.mycompany.com

SMTP mail settings

Available SMTP mail server settings are explained in the smtp_settings section of the Ruby on Rails guides on mailer configuration.

Setting Description
MAIL_ADDRESS Hostname of the SMTP server, e.g. smtp.mycompany.com
MAIL_PORT SMTP port, e.g. 25
MAIL_USER_NAME SMTP Username
MAIL_PASSWORD SMTP Password
MAIL_ENABLE_STARTTLS_AUTO Flag whether STARTTLS detection is enabled
MAIL_AUTHENTICATION Authentication type, can be login, plain or cram_md5
MAIL_DOMAIN SMTP Domain, necessary for certain SMTP relay configurations also called HELO domain, e.g. mycompany.com
MAIL_DEFAULT_SENDER_ADDRESS Sender address for outgoing emails, e.g. phraseapp@yourcompany.com
MAIL_RAISE_DELIVERY_ERRORS Set to 1 if you want the server to raise exceptions when mails cannot be send or to 0 if you want to ignore email delivery failures. We suggest setting this to 1 especially if you're in the process of testing the SMTP server connection.

Signup Disabling

Setting Description
SIGNUPS_DISABLED Disable the registration form to create new accounts for your system. This should be set to 0 for the first installation. If set to 0 anyone with access to PhraseApp Enterprise web interface can create new accounts. If set to 1 no one can create new accounts on the PhraseApp Enterprise installation.

SECRETs

There are several secret tokens that are used to encrypt data in PhraseApp Enterprise, such as the content of cookies and user passwords. Please make sure to use alphanumeric strings with at least 64 characters for all variables with names containing “SECRET”.

You must store these tokens in a safe location or your encrypted data such as user passwords will not work after you install updates or reinstall the system!