FME Flow: 2024.2
Deploying FME Flow with Docker Compose
As a multi-container application, FME Flow supports deployment with Docker Compose. We recommend deploying FME Flow this way only if you have worked with Docker before and understand its architecture.
Limitations and Considerations
When deciding if you want to deploy FME Flow with Docker Compose, keep in mind the following:
- Container deployments of FME Flow are built on Linux. Review our FME formats matrix and compare by platforms to see if the formats you plan to use are available on Linux. In particular:
- Certain Esri formats cannot be used in a Docker deployment due to operating system compatibility. For integrating Esri formats with FME Flow, we recommend installing FME Flow on Windows machines and not using containers. Esri integrations with ArcPy/ArcGIS Pro require Windows libraries. ArcGIS Server for Linux is not a usable alternative.
- Database formats (such as SQL Server) require the JDBC version of the format, which may require workspace modification if publishing from FME Form on Windows.
To use third-party libraries, JDBC drivers, and similar requires creating your own FME Flow engine container image.
- FME Flow deployed with Docker Compose is supported on Oracle Linux 7 only if the default Unbreakable Enterprise Kernel is used.
-
Adding FME Engines on a Separate Machine that is not containerized is not tested, supported, or recommended by Safe Software. It is not possible to use this architecture to add FME Engines on a Windows VM to a Docker deployment of FME Flow for format compatibility.
About the Docker Compose File for FME Flow
Services
The Compose file defines containers for each of the services that comprise FME Flow. These service names can be specified to start, stop, scale, or run other commands on a specific container. They are also used as the host names for the containers to communicate with each other.
Service |
Description |
---|---|
fmeflowcore | FME Flow Core |
fmeflowwebsocket | WebSocket Server |
fmeflowweb | FME Flow Web Services |
fmeflowdb | FME Flow Database |
fmeflowengine | FME Engines |
fmeflowqueue |
Note The preferred method for assigning FME Engines to queues is through the ENGINEPROPERTIES FME Engine Container environment variable.
|
nginx | Reverse proxy for FME Flow; receives all web traffic and forwards it to the right container. Also responsible for handling the https connection. |
See Also
Ports
The FME Flow deployment maps three ports to the host machine:
- nginx maps port 80 and 443 for the FME Flow Web User Interface. (See To Disable https (below) for more details.)
- fmeflowcore maps port 25 for SMTP relay.
Once FME Flow is deployed, any requests to these ports on the host machine are routed to the proper container. This means you can access the FME Flow Web User Interface on port 443 of your host machine even though the fmeflowweb service is actually running inside a container.
Volumes
The Compose file defines two main volumes:
- Database - Where the fmeflowdb service stores its database files.
- FME Flow System Share - Actually comprised of several volumes that restrict access to certain folders from containers that do not require it.
Deploying and Administering FME Flow on Docker Compose
Download the Docker Compose File for FME Flow
Docker Compose files are available at https://www.safe.com/support/downloads/ for each available tag (version) of the FME Flow container deployment.
Working with the docker compose Command
Use the docker compose command to create, start, and stop FME Flow. This command looks in the current directory for a file named docker-compose.yaml, and uses that for the definition of what to deploy. Alternatively, you can pass in a path to a compose file using the -f parameter. Example commands below assume that a docker-compose.yaml exists in the current working directory.
To Launch a New FME Flow Stack
Use the up parameter to bring up a new set of containers as defined in docker-compose.yaml. Pass in the -d parameter to run in the background.
docker compose up -d
Docker Compose creates the networks, volumes and containers defined in the Compose file. When complete, you can connect to the FME Flow Web User Interface on https://localhost/. The administrator user name and password defaults to admin and admin, respectively. You can change this on the Users page.
To Launch a New FME Flow Stack with a Dynamic Engine (CPU Usage) License
docker compose -f docker-compose.yaml -f docker-compose-dynamic-engine.yaml up -d
To Stop a Running FME Flow
docker compose stop
To Start FME Flow
docker compose start
To Restart FME Flow
docker compose restart
To Specify Services in the Compose File
You can specify the Services defined in the Compose file to start and stop. For example, to stop just the FME Flow Web Services container:
docker compose stop fmeflowweb
To Scale FME Engines
You can scale the number of running engines by launching additional FME Engines containers. (For more information, see Configuring the Number of FME Engines to Start.)
Use the scale command to specify the number of FME Engines you want after the command executes. The following command scales the number of engines to 4:
docker compose up --scale fmeflowengine=4
To Remove an FME Flow Deployment
The down command destroys all containers, volumes and networks that were created in the stack. The -v parameter removes the volumes as well.
docker compose down -v
Without the -v parameter, the Database and FME Flow System Share volumes are not destroyed, and if the same stack were launched again using up, no data would be lost.
To Upgrade an FME Flow Deployment
- Make a local backup of FME Flow on the Backup & Restore page of the Web User Interface. Make sure this file is saved somewhere outside of the FME Flow Resources folders, as those will be removed.
- Remove the containers, volumes and networks.
- Download the latest version of the containers.
- Deploy the new version of the containers.
- Restore your backup on the Backup & Restore page of the Web User Interface by uploading the backup file you saved in step 1.
docker compose down -v
docker compose pull
docker compose up -d
To Run Multiple FME Flows on One Machine
While not recommended for production machines, running multiple FME Flow stacks on a single machine may be useful if you are prototyping or testing workflows on multiple versions of FME Flow.
When running multiple FME Flows on the same machine, keep in mind the following:
- When launching a stack, docker compose prepends a project name, separated by an underscore, to all the containers, volumes and networks. The project name defaults to the name of the working directory when the stack is created. In the image below, the stack was launched in a directory named server, so server_ is prepended to all the resources created:
- Since a few Ports are mapped to the host machine, the same port cannot be used twice. You must either make sure only one is started at a time, or change the port mappings. For example, to use port 8080 instead of 443, delete the redirect port 80:8080 from the fmeflowweb container with this command:
If the docker-compose.yml files for each deployment are not in directories with different names, you can pass in a project name when launching the stack with the -p flag:
docker compose -p projectname up -d
EXTERNALPORT=8080 docker compose up -d
This sets the external port on all relevant containers to 8080 and brings up FME Flow.
To Disable https
To run FME Flow without https:
- Remove the exposed port 80 from the nginx container in the Docker Compose file (line 80:8080).
- Start the FME Flow with WEBPROTOCOL=http and EXTERNALPORT=80 variables. For example:
WEBPROTOCOL=http EXTERNALPORT=80 docker compose up -d
To Use a Custom TLS/SSL Certificate
To use a valid SSL certificate, make the following files available in a directory on the FME Flow host:
- nginx.crt: The certificate, including full certificate chain, if necessary.
- nginx.key: Private key used to generate the certificate.
Once provided, pass in the location to the certificate and key by setting the SSLCERTLOCATION=/path/to/certificates variable.