FME Flow: 2024.2
Working with FME Flow Container Environment Variables
To perform additional configuration of an FME Flow deployment with Docker Compose, define an environment variable section under the relevant container service. Each service has a different set of environment variables that can be defined.
FME Flow Web Services Container
Environment Variable |
Default Value |
Description |
---|---|---|
EXTERNALHOSTNAME | localhost | The host name that users will use to connect to this FME Flow. This is commonly the hostname or IP address of the physical machine on which the Docker deployment is running, or the external endpoint of the load balancer. This variable is used for Topic Monitoring. If you do not need to use Topic Monitoring, leave as localhost. |
EXTERNALPORT |
80 (Windows) 8080 (Linux) |
The port used to connect to the FME Flow Web User Interface. This should be the port exposed on the host or load balancer that users will use to connect. |
FMEFLOWHOSTNAME | fmeflowcore | The service name or host name of the FME Flow Core container. |
WEBSERVERHOSTNAME | fmeflowweb | The service name or host name of the FME Flow Web Services container. |
WEBPROTOCOL | https | The protocol FME Flow uses. Can be either http or https. |
WEBSOCKETHOSTNAME | fmeflowwebsocket | The service name or host name of the WebSocket server container. |
LOGPREFIX | The host name of the container | The prefix to use on the log files created by this container. |
PGSQLHOSTNAME | fmeflowdb | The service name or host name of the FME Flow PostgreSQL database. If you want to use a different database type, see Changing the Database Connection, below. |
PGSQLPORT | 5432 | The port for the FME Flow PostgreSQL database. If you want to use a different database type, see Changing the Database Connection, below. |
POSTGRESQLSSL | false | Set to true to force the PostgreSQL connection to use SSL. This adds the option sslrequire=true to the JDBC connection strings. |
PGSQLUSERNAME | fmeflow | The user to create as part of the FME Flow schema that FME Flow will use to connect to the database. |
FME Engine Container
Environment Variable |
Default Value |
Description |
---|---|---|
ENGINEPROPERTIES |
|
A comma-delimited list of properties to set on this engine. Engine properties are useful when assigning FME Engines to queues. |
EXTERNALHOSTNAME | localhost | The host name that users will use to connect to this FME Flow. This is commonly the hostname or IP address of the physical machine on which the Docker deployment is running. This is used for the data download results URL that is returned after running a job in the Data Download Service. If you don’t use the Data Download service, leave as localhost. |
EXTERNALPORT | 443 | Port used to connect to FME Flow. |
FMEFLOWHOSTNAME | fmeflowcore | The service name or host name of the FME Flow Core container. |
PGSQLHOSTNAME | fmeflowdb | The service name or host name of the FME Flow PostgreSQL database. If you want to use a different database type, see Changing the Database Connection, below. |
PGSQLPORT | 5432 | The port for the FME Flow PostgreSQL database. If you want to use a different database type, see Changing the Database Connection, below. |
POSTGRESQLSSL | false | Set to true to force the PostgreSQL connection to use SSL. This adds the option sslrequire=true to the JDBC connection strings. |
PGSQLUSERNAME | fmeflow | The user to create as part of the FME Flow schema that FME Flow will use to connect to the database. |
WEBPROTOCOL | https | The protocol FME Flow uses. Can be either http or https. |
LOGPREFIX | The host name of the container | The prefix to use on the log files created by this container. |
FME_INSTANCE_NAME | The host name of the container | The name of the engine that appears on the Engines page. |
NODENAME | The host name of the container | The host name of the engine that the Core container uses to communicate with this engine. |
FME Flow Core Container
Environment Variable |
Default Value |
Description |
---|---|---|
FMEFLOWHOSTNAME | fmeflowcore | The service name or host name of the FME Flow Core container. |
PGSQLHOSTNAME | fmeflowdb | The service name or host name of the FME Flow PostgreSQL database. To use a different database type, see Changing the Database Connection, below. |
PGSQLPORT | 5432 | The port for the FME Flow PostgreSQL database. To use a different database type, see Changing the Database Connection, below. |
POSTGRESQLSSL | false | Set to true to force the PostgreSQL connection to use SSL. This adds the option sslrequire=true to the JDBC connection strings. |
PGSQLUSERNAME | fmeflow | The user to create as part of the FME Flow schema that FME Flow will use to connect to the database. |
WEBSERVERHOSTNAME | fmeflowweb | The service name or host name of the FME Flow Web Services container. |
REDISHOSTS | fmeflowqueue | The service name or host name of the Memurai queue. |
REDISPORT | 6379 | The port for the Memurai queue. |
PORTPOOL |
This setting is required only if FME Engines that are not running in Docker are connecting to this FME Flow Core. If engines are connecting from outside the docker network, perform the following:
|
|
FIRSTLOGINCHANGEPASSWORD | true | If true, the user will be prompted to update the admin password upon initial login to the FME Flow Web User Interface following installation. If false, updating the admin password will not be required upon initial login. |
MAX_TRANSACTION_RESULT_SUCCESSES | Specifies the number of successful translations until an engine process should be restarted. | |
MAX_TRANSACTION_RESULT_FAILURES | Specifies the number of failed translations until an engine process should be restarted. | |
PRIMARY_PROCESS | core | Defines the purpose of this container. Valid values are core, websocket, or initpgsql. Setting to websocket starts only the websocket process. Setting to initpgsql runs the database initialization scripts against the configured database. For more information, see Initializing the PostgreSQL Database, below. |
NGINX Container
Environment Variable |
Default Value |
Description |
---|---|---|
WEBPROTOCOL | https | The protocol FME Flow uses. Can be either http or https. |
EXTERNALHOSTNAME | localhost | The host name that users will use to connect to this FME Flow. This is commonly the hostname or IP address of the physical machine on which the Docker deployment is running. This variable is used for Topic Monitoring. If you do not need to use Topic Monitoring, leave as localhost. |
EXTERNALPORT | 443 | The port used to connect to FME Flow. |
NGINX_WORKER_PROCESSES | 1 | Number of NGINX workers to start. |
Changing the Database Connection
Initializing the PostgreSQL Database
When a new stack is launched, a mode of the core container populates an empty PostgreSQL database with the FME Flow database schema before starting FME Flow. If you want to use an existing PostgreSQL database for your FME Flow, you must configure an initialization container using the following environment variables.
For example, the following command populates the schema in an existing PostgreSQL database running on host my-psgql-hostname, and then exits.
docker run -e PGSQLHOSTNAME=my-pgsql-hostname -e PGSQLPORT=5432 -e PGSQLADMINUSER=postgres -e PGSQLADMINPASSWORD=postgres -e PRIMARY_PROCESS=initpgsql safesoftware/fmeflow-core:2024-latest
Environment Variable |
Default Value |
Description |
---|---|---|
PGSQLHOSTNAME | fmeflowdb |
The host name of the PostgreSQL database that is to be initialized. |
PGSQLPORT | 5432 | The port to connect to the PostgreSQL database. |
PGSQLADMINUSER | postgres | A user that exists on the PostgreSQL database that has permissions to create a database. |
PGSQLADMINPASSWORD | The password for the PGSQLADMINUSER. | |
PGSQLADMINDATABASE | Same value as PGSQLADMINUSER | Set this to the database to which to connect initially as the PGSQLADMINUSER to initialize the database schema on the fmeflowdbinit service. |
PGSQLUSERNAME | fmeflow | The user to create as part of the FME Flow schema that FME Flow will use to connect to the database. |
PRIMARY_PROCESS | Set to initpgsql. | |
AZUREPOSTGRESQL | false | Set to true on the fmeflowdbinit service in the Docker Compose file when using an Azure database for PostgreSQL to ensure the connection string is formatted correctly. |
Running the Containers as a Different User
By default, the FME Flow containers run as a user named fmeflow in group fmeflow, with UID and GID 1363. You may want the UID and GID of the user in the container to match a user defined on the host machine. For example, you may want to use a host bind mount for the FME Flow System Share volume instead of using Docker volumes. If mounting a host directory into the container, it is optimal if the permissions in that folder match a real user on the host.
To match the user and group running a container with a user defined on the host machine, pass in variables FMEFLOW_UID and FMEFLOW_GID, set to the UID and GID of the user and group ID you want to use, respectively. Additionally, you must run the containers as the root user so that the container init can set the right permissions on the files. This is done in a Docker run command with the --user=0 flag, and in Compose with the attribute user: 0 to run as root.
Running Containers in the Local Time Zone
By default, FME Flow containers run in Coordinated Universal Time (UTC). To adjust to the local time zone of the container hosts, mount time zone files to the fmeflowweb, fmeflowcore, fmeflowqueue, and fmeflowengine containers, as follows:
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
Alternatively, set the TZ environment variable for each container, as follows:
TZ=<timezone>
where <timezone> is a valid country code. For a list of country codes, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.