Fork me on GitHub
Phraseanet Documentation

Environnement variables

Environment variables are defined in the .env file.

Their assignment takes effect according to the state of the stack:

  • install
  • build
  • run

Variables tagged “@deprecated” are deprecated.

Phraseanet stack composition

Stack composition use "COMPOSE_FILES" and "COMPOSE_PROFILES" variables. Use it to adapt the stack in accordance with your needs.

1/ "COMPOSE_FILE" value define docker-compose files to include. See available files list below :
  • "docker-compose.yml" : Services Nginx, Phraseanet, workers, scheduler
  • "docker-compose.datastores.yml" : All data storage services required by Phraseanet except for files storage.
  • "docker-compose.tools.yml" : Dev and debug tools
  • "docker-compose.override.yml" : For dev only, use the code from hosts, activate ide debugger, ports mapping for datastores
  • "docker-compose.phrasea.yml" : For integrate this stack in the "traefik" of Phrasea stack

2/ "COMPOSE_PROFILES" value define which profiles you want to use in docker-compose.
See available services and worker profiles below:

Profiles service list:
  • "app" : launch Phraseanet and Workers.
  • "gateway-classic" : launch nginx service.
  • "gateway-traefik" : nginx is launched behind a traefik service, the traefik is include in this stack (todo) or Traefik include in Phrasea Stack.
  • "workers" : launch one worker container by kind of Jobs, you can also choose to launch only some workers, see worker list below.
  • "worker" : launch one container worker with all jobs run on it.
  • "db" : launch a mariadb container, because this is the primary datastore for production usage, use your own service.
  • "elastisearch" : launch a elasticsearch container.
  • "rabbitmq" : launch a rabbitmq container.
  • "redis" : launch a redis container.
  • "builder" : launch the builder container, for dev only.
  • "elk" : launch an elk stack, for dev only.
  • "squid" : reverse proxy for dev only.
  • "mailhog" : for catching all email emit by app for dev.
  • "db-backup" : launch and run a container to cron database backups and backup file's rotation.
Profiles worker list:
  • "assetsInjest"
  • "createRecord"
  • "deleteRecord"
  • "editRecord"
  • "exportMail"
  • "exposeUpload"
  • "exportFtp"
  • "mainQueue"
  • "populateIndex"
  • "pullAssets"
  • "recordsActions"
  • "subdefCreation"
  • "subtitle"
  • "validationReminder"
  • "webhook"
  • "writeMetadatas"
  • "scheduler" : legacy task manager. Warning! Use only if your stack require using old task.
See Docker compose profile documentation for more information about docker compose profiles.


See below some examples of stack composition:

For development:
  • COMPOSE_FILE=docker-compose.yml:docker-compose.datastores.yml:docker-compose.tools.yml:docker-compose.override.yml
  • COMPOSE_PROFILES=app,db,pma,elasticsearch,redis,rabbitmq,workers,mailhog,builder,gateway-classic
For testing with debug:
  • COMPOSE_FILE=docker-compose.yml:docker-compose.datastores.yml:docker-compose.tools.yml
  • COMPOSE_PROFILES=app,db,pma,elasticsearch,rabbitmq,redis,worker,workers,mailhog,gateway-classic
For testing with debug and SSL (the traekik is provide by Phrasea stack):
  • COMPOSE_FILE=docker-compose.yml:docker-compose.datastores.yml:docker-compose.tools.yml:docker-compose.under-phrasea.yml
  • COMPOSE_PROFILES=app,gateway-traefik,db,pma,elasticsearch,rabbitmq,redis,worker,workers,mailhog
For production (require using your own databases services and SSL):
  • COMPOSE_FILE=docker-compose.yml:docker-compose.datastores.yml:docker-compose.tools.yml:docker-compose.scheduler.yml
  • COMPOSE_PROFILES=app,workers,gateway-traefik
Example with all profiles:
  • COMPOSE_FILE=docker-compose.yml:docker-compose.datastores.yml:docker-compose.tools.yml
  • COMPOSE_PROFILES=app,gateway-classic,db,elasticsearch,redis,rabbitmq,pma,mailhog,assetsInjest,createRecord,deleteRecord,editRecord, exportMail,exposeUpload,exportFtp,mainQueue,populateIndex,pullAssets,recordsActions,subdefCreation, subtitle,validationReminder,webhook,writeMetadatas,scheduler,elk,db-backup
myLib
Name Type Comment
COMPOSE_FILE
run
Define "docker-compose" files to include.
COMPOSE_PROFILES
run
Define which profiles you want to use in "docker-compose".

Phraseanet container settings

myLib
Name Type Comment
PHRASEANET_DOCKER_REGISTRY
run
Registry from which you pull docker images.
Avalaible values:
  • "local" : build and use your images.
  • "alchemyfr" : using predbuild images from Alchemy registry.
PHRASEANET_DOCKER_TAG
run
Docker images tag.

Phraseanet container network settings

myLib
Name Type Comment
PHRASEANET_APP_PORT
run
Application port.
PHRASEANET_HOSTNAME
run
Domain name used by traefik in Phrasea stack
PHRASEA_NETWORK_NAME
run
Phrasea network Name, the name of Phrasea network and see by traefik
PHRASEA_DOMAIN
none
PHRASEA_GATEWAY_IP
none

Phraseanet container entrypoint settings

myLib
Name Type Comment
PHRASEANET_INSTALL
run
Do an installation if Phraseanet is not installed.
Avalaible values: "0" | "1"
PHRASEANET_SETUP
run
Apply they env variables values to config/configuration.yml file.
Avalaible values: "0" | "1"
PHRASEANET_UPGRADE
run
Play an upgrade.
Avalaible values: "0" | "1"

RabbitMQ settings

myLib
Name Type Comment
RABBITMQ_DEFAULT_USER
run
RabbitMQ user account : create an account in RabbitMQ container and use it in Phraseanet configuration.
RABBITMQ_DEFAULT_PASS
run
RabbitMQ password account.
RABBITMQ_MANAGEMENT_PORT
run
RabbitMQ Http interface management port.

Gateway settings (nginx)

myLib
Name Type Comment
GATEWAY_SEND_TIMEOUT
run
Value applied to "send_timeout", "keepalive_timeout", "client_header_timeout" and "client_body_timeout" nginx settings.
GATEWAY_PROXY_TIMEOUT
run
Timeout for establishing a connection with a proxied server. See documentation.
GATEWAY_FASTCGI_TIMEOUT
run
Value applied to "fastcgi_connect_timeout", "fastcgi_read_timeout" and "fastcgi_send_timeout" nginx settings.

PHP settings

myLib
Name Type Comment
MAX_BODY_SIZE
run
Maximum request body size for Php and Nginx. Example "1G"
MAX_INPUT_VARS
run
Maximum Php input var. See max-input-vars Php documentation.
MAX_EXECUTION_TIME
run
Maximum Php execution time in second. See max-execution-time Php documentation.
MAX_INPUT_TIME
run
Maximum Php input time in second. See max-input-time Php documentation.
REQUEST_TERMINATE_TIMEOUT
run
Php timeout for serving a single request after which the worker process will be killed. This option should be used when the "max_execution_time" ini option does not stop script execution for some reason. A value of "0" means "off".
Available units: s(econds)[default], m(inutes), h(ours), or d(ays).
OPCACHE_ENABLED
run
Php Opcache status. See opcache Php documentation.
Avalaible values: "0" | "1"
SESSION_CACHE_LIMITER
run
Php session cache limiter. See session-cache-limiter Php documentation.
Avalaible values: "off" | "on"
PHP_LOG_LEVEL
run
Php logging level. See error-reporting Php documentation.
Available values: "alert" | "error" | "warning" | "notice" | "debug"

MySQL settings

myLib
Name Type Comment
MYSQL_ROOT_PASSWORD
build
MySQL root password.
SERVER_NAME
build
MySQL server host address.
MYSQL_MAX_ALLOWED_PACKET
run
MySQL maximum allowed packet.
Value applied to "max_allowed_packet" MySQL server setting.
MYSQL_MAX_CONNECTION
run
Value applied to "max_connection" MySQL server setting.
MYSQL_SLOW_QUERY_LOG
run
Enable the slow query log to see queries with especially long duration.
Value applied to "slow_query_log" MySQL server setting.
MYSQL_LONG_QUERY_TIME
run
Value applied to "long_query_time" MySQL server setting.
MYSQL_QUERY_CACHE_LIMIT
run
Cache only tiny result sets, so we can fit more in the query cache.
Value applied to "query_cache_limit" MySQL server setting.
MYSQL_QUERY_CACHE_SIZE
run
Value applied to "query_cache_size" MySQL server setting.
MYSQL_KEY_BUFFER_SIZE
run
Value applied to "key_buffer_size" MySQL server setting.

DB Backup settings

myLib
Name Type Comment
DB_BACKUP_VOLUME_PATH
run
Path where the backuped files will be locally stored
DB_BACKUP_MYSQL_HOST
run
The database server host
DB_BACKUP_MYSQL_USER
run
The database server user
DB_BACKUP_MYSQL_PASS
run
The database server pass
DB_BACKUP_MAX_BACKUPS
run
The backup file's rotation time in days
DB_BACKUP_INIT_BACKUP
run
If set, create a backup when the container starts
DB_BACKUP_INIT_RESTORE_LATEST
run
If set, restores latest backup.
DB_BACKUP_CRON_TIME
run
Every day at 03:00
DB_BACKUP_GZIP_LEVEL
run
Make it small

Phraseanet general settings

Variables below are used in the "configuration.yml" file:
myLib
Name Type Comment
ENV_SET_PHRASEANET_PROJECT_NAME
run
Application title displayed on Phraseanet homepage.
Available values:
  • "0" : Keep value define configuration.yml
  • "1" : Use PHRASEANET_PROJECT_NAME
PHRASEANET_PROJECT_NAME
run
Application title displayed on Phraseanet homepage. Depend on "ENV_SET_PHRASEANET_PROJECT_NAME" variable value.
PHRASEANET_SERVER_NAME
run
Variables below used to define the first user / email couple :
myLib
Name Type Comment
PHRASEANET_ADMIN_ACCOUNT_ID
run
Phraseanet root account ID. If this variable is filled in, "PHRASEANET_ADMIN_ACCOUNT_PASSWORD" variable value will override targeted account ID password each time Phraseanet is started.
PHRASEANET_ADMIN_ACCOUNT_EMAIL
run
PHRASEANET_ADMIN_ACCOUNT_PASSWORD
run

Phraseanet MySQL settings

myLib
Name Type Comment
PHRASEANET_DB_HOST
install
PHRASEANET_DB_PORT
install
PHRASEANET_DB_USER
install
PHRASEANET_DB_PASSWORD
install

Phraseanet database settings

myLib
Name Type Comment
INSTALL_DB_TEMPLATE
install
INSTALL_APPBOX
install
INSTALL_DATABOX
install

Phraseanet languages settings

myLib
Name Type Comment
PHRASEANET_AVAILABLE_LANGUAGE
run
Available languages (list of language code separated by comma).
PHRASEANET_DEFAULT_LANGUAGE
run
Default language code.

Phraseanet binaries execution timeouts settings

myLib
Name Type Comment
PHRASEANET_FFMPEG_TIMEOUT
run
PHRASEANET_FFPROBE_TIMEOUT
run
PHRASEANET_GS_TIMEOUT
run
PHRASEANET_MP4BOX_TIMEOUT
run
PHRASEANET_SWFTOOLS_TIMEOUT
run
PHRASEANET_UNOCON_TIMEOUT
run
PHRASEANET_EXIFTOOL_TIMEOUT
run

Phraseanet RabbitMQ settings

myLib
Name Type Comment
PHRASEANET_RABBITMQ_HOST
run
PHRASEANET_RABBITMQ_PORT
run
PHRASEANET_RABBITMQ_SSL
run
PHRASEANET_RABBITMQ_VHOST
run
PHRASEANET_RABBITMQ_HEARTBEAT
run

Phraseanet network settings

Enter comma separated list of IP or SUBNETS for variables below:
myLib
Name Type Comment
PHRASEANET_TRUSTED_PROXIES
run
PHRASEANET_DEBUG_ALLOWED_IP
run
PHRASEANET_SUBNET_IPS
run

Phraseanet API settings

myLib
Name Type Comment
PHRASEANET_API_ENABLED
run
PHRASEANET_API_SSL
run
PHRASEANET_API_AUTH_TOKEN_HEADER_ONLY
run

Phraseanet Mapbox geolocalisation settings

myLib
Name Type Comment
PHRASEANET_MAPBOX_ACTIVATE
run
PHRASEANET_MAPBOX_TOKEN
run
PHRASEANET_MAPBOX_KIND
run

Phraseanet mail settings

myLib
Name Type Comment
PHRASEANET_EMITTER_EMAIL
run
PHRASEANET_MAIL_OBJECT_PREFIX
run
Phraseanet SMTP settings:
myLib
Name Type Comment
PHRASEANET_SMTP_ENABLED
run
Available values:
  • "true" : SMTP parameters are set from .env file.
  • "false" : SMTP parameters should be set in GUI.
PHRASEANET_SMTP_HOST
run
PHRASEANET_SMTP_PORT
run
PHRASEANET_SMTP_AUTH_ENABLED
run
PHRASEANET_SMTP_SECURE_MODE
run
PHRASEANET_SMTP_USER
run
PHRASEANET_SMTP_PASSWORD
run

Phraseanet Workers and Scheduler settings

myLib
Name Type Comment
PHRASEANET_EXPLODE_WORKER
run
Define how many process are launched in the "worker" container:
  • "0" : Only one process is launched inside the container with no specializing, in this case the scaling needs to be made by the orchestation eg K8S.
    This is the recommended way.
  • "1" : Deploys one phraseanet worker for each kind of job, the parallelime is defined by value of envs started by "PHRASEANET_WORKER_XXX"
Eg: For two subdefinitions builded at the same time, set "PHRASEANET_WORKER_subdefCreation=2"
PHRASEANET_WORKERS_LAUNCH_METHOD
run
When PHRASEANET_EXPLODE_WORKER=1, it define the method for launching Phraseanet workers process.
Available values :
  • "supervisor" : Launch it with supervisor.
  • "" : Launch phraseanet workers with a "bin/console".
Note for old Phraseanet task planner AKA "Phraseanet scheduler": To launch the "scheduler" container, add "scheduler" profile to "COMPOSE_PROFILES" env var. Launch this container only if you need to use the old Phraseanet tasks.
PHRASEANET_WORKER_assetsIngest
run
PHRASEANET_WORKER_createRecord
run
PHRASEANET_WORKER_deleteRecord
run
PHRASEANET_WORKER_editRecord
run
PHRASEANET_WORKER_exportMail
run
PHRASEANET_WORKER_exposeUpload
run
PHRASEANET_WORKER_ftp
run
PHRASEANET_WORKER_mainQueue
run
PHRASEANET_WORKER_populateIndex
run
PHRASEANET_WORKER_pullAssets
run
PHRASEANET_WORKER_recordsActions
run
PHRASEANET_WORKER_subdefCreation
run
PHRASEANET_WORKER_subtitle
run
PHRASEANET_WORKER_validationReminder
run
PHRASEANET_WORKER_webhook
run
PHRASEANET_WORKER_writeMetadatas
run

Phraseanet Locales settings

myLib
Name Type Comment
LC_MESSAGES
run
LC_COLLATE
run
LC_IDENTIFICATION
run
LANG
run
LC_MEASUREMENT
run
LC_CTYPE
run
LC_TIME
run
LC_NAME
run

Phraseanet volumes location settings

myLib
Name Type Comment
PHRASEANET_CONFIG_DIR
run
PHRASEANET_LOGS_DIR
run
PHRASEANET_DATA_DIR
run
PHRASEANET_DB_DIR
run
PHRASEANET_ELASTICSEARCH_DIR
run
PHRASEANET_THUMBNAILS_DIR
run
PHRASEANET_CUSTOM_DIR
run
PHRASEANET_PLUGINS_DIR
run
PHRASEANET_TMP_DIR
run
PHRASEANET_CACHE_DIR
run
PHRASEANET_DOWNLOAD_DIR
run
PHRASEANET_LAZARET_DIR
run
PHRASEANET_CAPTION_DIR
run
PHRASEANET_WORKER_TMP
run

Phraseanet plugin support settings

myLib
Name Type Comment
PHRASEANET_PLUGINS
build
PHRASEANET_SSH_PRIVATE_KEY
build

ImageMagick default policy override setting

myLib
Name Type Comment
IMAGEMAGICK_POLICY_VERSION
run
IMAGEMAGICK_POLICY_WIDTH
run
IMAGEMAGICK_POLICY_HEIGHT
run
IMAGEMAGICK_POLICY_MAP
run
IMAGEMAGICK_POLICY_MEMORY
run
IMAGEMAGICK_POLICY_AREA
run
IMAGEMAGICK_POLICY_DISK
run
IMAGEMAGICK_POLICY_TEMPORARY_PATH
run

New Relic monitoring settings

myLib
Name Type Comment
NEWRELIC_ENABLED
run
Enable (or not) the "New Relic" agent for plateform monitoring.
NEWRELIC_LICENSE_KEY
run
NEWRELIC_APP_NAME
run

Blackfire settings

myLib
Name Type Comment
BLACKFIRE_ENABLED
run
In developpement mode, Enable (or not) the "Blackfire" agent for plateform monitoring.
BLACKFIRE_SERVER_ID
run
BLACKFIRE_SERVER_TOKEN
run

Development purpose

See Phraseanet development-mode documentation for more information.
myLib
Name Type Comment
PHRASEANET_PHPMYADMIN_PORT
run
"PhpMyAdmin" http port mapping.
MAILHOG_GUI_PORT
run
"Mailhog" http port mapping.
"Xdebug" settings:
myLib
Name Type Comment
XDEBUG_ENABLED
run
XDEBUG_PROFILER_ENABLED
run
IDE_KEY
run
XDEBUG_REMOTE_HOST
run
PHP_IDE_CONFIG=serverName
run
PHRASEANET_FTP_DIR
run
For dev or testing export ftp-server
For dev proxy squid WIP:
  • PHRASEANET_SQUID_DIR=./volumes/squid
  • PHRASEANET_SQUID_CONF= ./docker/squid/squid.conf
  • PHRASEANET_SQUID_PORT=3128
myLib
Name Type Comment
SSH_AUTH_SOCK
none
For dev who don't have SSH_AUTH_SOCK (avoid an empty volume name)