Working with FME Server Container Environment Variables
To perform additional configuration of an FME Server 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.
Changing the Database Connection
Note:To configure FME Server to connect to a Microsoft SQL Server or an Oracle database,contact Safe Support。
Initializing the PostgreSQL Database
When a new stack is launched, a mode of the core container populates an empty PostgreSQL database with the FME Server database schema before starting FME Server. If you want to use an existing PostgreSQL database for your FME Server, 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/fmeserver-core:2018-latest
Environment Variable |
Default Value |
Description |
---|---|---|
PGSQLHOSTNAME | fmeserverdb. | 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. | |
PRIMARY_PROCESS | Set toinitpgsql.。 |
Running the Containers as a Different User
缺省情况下,FME服务器容器作为用户名为fmeserver中的用户名为fmeserver,使用UID和GID 1363.您可能希望容器中用户的UID和GID匹配主机上定义的用户。例如,您可能希望为FME服务器系统共享卷而不是使用Docker卷来使用主机绑定安装寄存器。如果将主机目录安装到容器中,则如果该文件夹中的权限与主机上的真实用户匹配,则最佳。
To match the user and group running a container with a user defined on the host machine, pass in variablesFMESERVER_UID和FMESERVER_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 Dockerruncommand with the--user=0标志,以及与属性的撰写user: 0to run as root.
Container Environment Variables
FME Server Web Services Container
Environment Variable |
Default Value |
Description |
---|---|---|
外部安置名 | localhost | The host name that users will use to connect to this FME Server. 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 forTopic Monitoring。如果您不需要使用主题监控,请假localhost。 |
EXTERNALPORT | 80 | 用于连接到的端口FME Server Web User Interface。This should be the port exposed on the host or load balancer that users will use to connect. |
FMESERVERHOSTNAME | fmeservercore | FME服务器核心容器的服务名称或主机名。 |
WEBSERVERHOSTNAME | fmeserverweb | FME Server Web服务容器的服务名称或主机名。 |
WEBPROTOCOL | https | The protocol FME Server uses. Can be eitherhttp或者https。 |
WEBSOCKETHOSTNAME | fmeserverwebsocket | 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. |
FME引擎容器
Environment Variable |
Default Value |
Description |
---|---|---|
外部安置名 | localhost | The host name that users will use to connect to this FME Server. 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 theData Download Service。If you don’t use the Data Download service, leave aslocalhost。 |
EXTERNALPORT | 443 | Port used to connect to FME Server. |
FMESERVERHOSTNAME | fmeservercore | FME服务器核心容器的服务名称或主机名。 |
PGSQLHOSTNAME | fmeserverdb. | The service name or host name of the FME Server PostgreSQL database. If you want to use a different database type, seeChanging the Database Connection, above. |
PGSQLPORT | 5432 | The port for the FME Server PostgreSQL database. If you want to use a different database type, seeChanging the Database Connection, above. |
WEBPROTOCOL | https | The protocol FME Server uses. Can be eitherhttp或者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 | 出现在的引擎的名称Engines & Licensingpage. |
NODENAME | The host name of the container | 的主机名ngine that the Core container uses to communicate with this engine. |
FME Server Core Container
Environment Variable |
Default Value |
Description |
---|---|---|
FMESERVERHOSTNAME | fmeservercore | FME服务器核心容器的服务名称或主机名。 |
PGSQLHOSTNAME | fmeserverdb. | The service name or host name of the FME Server PostgreSQL database. To use a different database type, seeChanging the Database Connection, above. |
PGSQLPORT | 5432 | The port for the FME Server PostgreSQL database. To use a different database type, seeChanging the Database Connection, above. |
WEBSERVERHOSTNAME | fmeserverweb | FME Server Web服务容器的服务名称或主机名。 |
REDISHOSTS | fmeserverqueue | The service name or host name of the Redis queue. |
REDISPORT | 6379 | The port for the Redis queue. |
PORTPOOL | 只有在Docker中未运行的FME引擎连接到此FME服务器核心时,才需要此设置。如果引擎从Docker网络外部连接,请执行以下操作:
|
|
max_transaction_result_successes. | 指定应重新启动引擎过程之前成功的翻译数。 | |
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 arecore,websocket, orinitpgsql.。Setting towebsocketstarts only the websocket process. Setting toinitpgsql.针对已配置的数据库运行数据库初始化脚本。有关更多信息,请参阅Initializing the PostgreSQL Database, above. |
NGINX Container
Environment Variable |
Default Value |
Description |
---|---|---|
WEBPROTOCOL | https | The protocol FME Server uses. Can be eitherhttp或者https。 |
外部安置名 | localhost | The host name that users will use to connect to this FME Server. This is commonly the hostname or IP address of the physical machine on which the Docker deployment is running. This variable is used forTopic Monitoring。如果您不需要使用主题监控,请假localhost。 |
EXTERNALPORT | 443 | The port used to connect to FME Server. |
NGINX_WORKER_PROCESSES | 1 | Number of NGINX workers to start. |