PhraseApp On-Premise 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 On-Premise. 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=true

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

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 On-Premise to be able to connect to your MySQL server. User and pass must be url-encoded with the Percent-encoding.
 

elasticsearch

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

Redis

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

Domain settings

BASE_URL Hostname used for links in emails e.g. https://phraseapp.mycompany.com

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

SMTP mail settings

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

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 Username 

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

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 On-Premise web interface can create new accounts. If set to 1 no one can create new accounts on the PhraseApp On-Premise installation.
 

Disable Rate Limiting

DISABLE_RATE_LIMIT
Setting this flag to true disables rate limiting for both concurrent number of requests and requests per time window for rate limited endpoints. By default only 2 concurrent requests and 200 requests per 5 minutes are allowed. 


SECRETs

There are several secret tokens that are used to encrypt data in PhraseApp On-Premise, 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!

Did this answer your question?