ThingWorx Flow > 설치 및 구성 > ThingWorx Flow Docker 사용 > ThingWorx Flow Docker 이미지 빌드 및 실행
ThingWorx Flow Docker 이미지 빌드 및 실행
ThingWorx Flow Docker 이미지 빌드 
1. Docker Engine을 시작합니다.
2. ThingWorx Flow 9.0.17, 9.1.12, 9.2.8, 9.3.3부터 ThingWorx-Platform-Flow-Dockerfiles\dockerfiles\rabbitmq\definitions.jsonname, userpassword를 RabbitMQ 연결에 사용되는 사용자 이름 및 암호와 함께 추가합니다.
{
"users": [
{
"name": "<rabbitMQ username",
"password": "<RabbitMQ password>",
"tags": "administrator"
}
],
"vhosts": [
{
"name": "symphony"
}
],
"permissions": [
{
"user": "<RabbitMQ username>",
"vhost": "symphony",
"configure": ".*",
"write": ".*",
"read": ".*"
}
],
"parameters": [],
"policies": [],
"queues": [],
"exchanges": [],
"bindings": []
}
3. \ThingWorx-Flow-Dockerfiles-x-x-x\ThingWorx-Platform-Flow-Dockerfiles\dockerfiles를 찾아 ./makeImages.sh 명령을 실행합니다.
ThingWorx Flow 9.0.17 Docker 이미지 빌드 후 
이미지를 빌드한 후 다음 파일에 사용자 이름 및 암호를 추가합니다.
파일
매개 변수
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-mssql-and-flow-mssql.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-postgres.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-azure.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RABBITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
MSSQL_POSTGRES_PASSWORD
TWX_DATABSE_USERNAME
TWX_DATABSE_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
POSTGRES_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/security-common/keys.json
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/security-common/keys.json
MODEL_DB.connection.password
QUEUE.ADAPTERS.AMQP.CONFIG.credentials
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-h2-and-flow-postgres.yml
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
THINGWORX_INITIAL_ADMIN_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/docker-compose-twx-posgres-ha-and-flow-postgres.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
HAPROXY_STAT_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
ZK_SSL_TRUSTSTORE_PSWORD
IGNITE_KEYSTORE_PASSWORD
POSTGRES_USER
POSTGRES_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_TRUSTSTORE_PASSWORD
ZK_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_KEYSTORE_PASSWORD
POSTGRES_SSL_KEYSTORE_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/rabbitmq/Dockerfile
RABBITMQ_USER
RABBITMQ_PASSWORD
ThingWorx Flow 9.1.12 이상 Docker 이미지 빌드 후 
이미지를 빌드한 후 다음 파일에 사용자 이름 및 암호를 추가합니다.
파일
매개 변수
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-mssql-and-flow-mssql.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-postgres.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-azure.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RABBITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
MSSQL_POSTGRES_PASSWORD
TWX_DATABSE_USERNAME
TWX_DATABSE_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
POSTGRES_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/security-common/keys.json
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/security-common/keys.json
MODEL_DB.connection.password
QUEUE.ADAPTERS.AMQP.CONFIG.credentials
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-h2-and-flow-postgres.yml
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
THINGWORX_INITIAL_ADMIN_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/docker-compose-twx-posgres-ha-and-flow-postgres.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
HAPROXY_STAT_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
ZK_SSL_TRUSTSTORE_PSWORD
IGNITE_KEYSTORE_PASSWORD
POSTGRES_USER
POSTGRES_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_TRUSTSTORE_PASSWORD
ZK_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_KEYSTORE_PASSWORD
POSTGRES_SSL_KEYSTORE_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/rabbitmq/Dockerfile
RABBITMQ_USER
RABBITMQ_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/db-seed/Dockerfile
POSTGRES_USER
POSTGRES_PASSWORD
ThingWorx Flow 9.2.8 이상 Docker 이미지 빌드 후 
이미지를 빌드한 후 다음 파일에 사용자 이름 및 암호를 추가합니다.
파일
매개 변수
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-mssql-and-flow-mssql.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-postgres.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-azure.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RABBITMQ_USERNAME
RABBITMQ_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
MSSQL_POSTGRES_PASSWORD
TWX_DATABSE_USERNAME
TWX_DATABSE_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
POSTGRES_PASSWORD
MSSQL_SA_PASSWORD
INFLUXDB_DATABASE_USERNAME
INFLUXDB_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-mqtt.override.yml
MOSQUITTO_USERNAME
MOSQUITTO_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/security-common/keys.json
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/security-common/keys.json
MODEL_DB.connection.password
QUEUE.ADAPTERS.AMQP.CONFIG.credentials
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-h2-and-flow-postgres.yml
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
THINGWORX_INITIAL_ADMIN_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/docker-compose-twx-posgres-ha-and-flow-postgres.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
HAPROXY_STAT_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
ZK_SSL_TRUSTSTORE_PSWORD
IGNITE_KEYSTORE_PASSWORD
POSTGRES_USER
POSTGRES_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_TRUSTSTORE_PASSWORD
ZK_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_KEYSTORE_PASSWORD
POSTGRES_SSL_KEYSTORE_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/rabbitmq/Dockerfile
RABBITMQ_USER
RABBITMQ_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/db-seed/Dockerfile
POSTGRES_USER
POSTGRES_PASSWORD
ThingWorx Flow 9.3.3 이상 Docker 이미지 빌드 후 
이미지를 빌드한 후 다음 파일에 사용자 이름 및 암호를 추가합니다.
파일
매개 변수
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-mssql-and-flow-mssql.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-postgres.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-azure.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RABBITMQ_USERNAME
RABBITMQ_PASSWORD
THINGWORX_INITIAL_METRICS_USER_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
MSSQL_POSTGRES_PASSWORD
TWX_DATABSE_USERNAME
TWX_DATABSE_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
POSTGRES_PASSWORD
MSSQL_SA_PASSWORD
INFLUXDB_DATABASE_USERNAME
INFLUXDB_DATABASE_PASSWORD
KEYSTORE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-mqtt.override.yml
MOSQUITTO_USERNAME
MOSQUITTO_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/security-common/keys.json
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/security-common/keys.json
MODEL_DB.connection.password
QUEUE.ADAPTERS.AMQP.CONFIG.credentials
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-h2-and-flow-postgres.yml
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
THINGWORX_INITIAL_ADMIN_PASSWORD
THINGWORX_INITIAL_METRICS_USER_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/docker-compose-twx-posgres-ha-and-flow-postgres.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
HAPROXY_STAT_PASSWORD
THINGWORX_INITIAL_METRICS_USER_PASSWORD
ThingWorx Flow Docker 이미지 실행 
단일 환경의 경우
1. /etc/hosts 파일에 127.0.0.1 flow.local.rnd.ptc.com을 추가합니다.
flow.local.rnd.ptc.com 값은 수정할 수 없습니다.
2. 단일 ThingWorx Flow 엔진으로 ThingWorx를 시작하려면 /ThingWorx-Flow-Dockerfiles-x-x-x/ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single로 이동하고 다음과 같이 환경에 따라 적절한 명령을 실행합니다.
환경
시작
ThingWorx Flow PostgreSQL이 포함된 ThingWorx Platform H2
./startImages-twx-http-h2-and-flow-postgres.sh
ThingWorx Flow PostgreSQL이 포함된 ThingWorx Platform PostgreSQL
./startImages-twx-http-postgres-and-flow-postgres.sh
ThingWorx Flow Microsoft SQL Server가 포함된 ThingWorx Platform Microsoft SQL Server
./startImages-twx-http-mssql-and-flow-mssql.sh
ThingWorx Flow Azure PostgreSQL이 포함된 ThingWorx Platform PostgreSQL
./startImages-twx-http-postgres-and-flow-azure.sh
3. Docker 이미지가 실행되면 브라우저에서 https://flow.local.rnd.ptc.com/Thingworx/Composer/로 이동합니다.
4. ThingWorx Composer에서 LoadOAuthConfiguration 서비스를 실행하여 OAuth를 ThingWorx Flow 서버에 로드합니다.
단일 ThingWorx Flow 엔진으로 ThingWorx를 중지하려면 /ThingWorx-Flow-Dockerfiles-x-x-x/ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single로 이동하고 다음과 같이 환경에 따라 적절한 명령을 실행합니다.
환경
중지
ThingWorx Flow PostgreSQL이 포함된 ThingWorx Platform H2
./stopImages-twx-http-h2-and-flow-postgres.sh
ThingWorx Flow PostgreSQL이 포함된 ThingWorx Platform PostgreSQL
./stopImages-twx-http-postgres-and-flow-postgres.sh
ThingWorx Flow Microsoft SQL Server가 포함된 ThingWorx Platform Microsoft SQL Server
./stopImages-twx-http-mssql-and-flow-mssql.sh
ThingWorx Flow Azure PostgreSQL이 포함된 ThingWorx Platform PostgreSQL
./stopImages-twx-http-postgres-and-flow-azure.sh
고가용성 환경의 경우
1. /etc/hosts 파일에 127.0.0.1 haproxy를 추가합니다.
기본적으로 haproxy가 사용됩니다. 이 값을 변경하기 전에 ThingWorx Flow Docker 구성의 지침에 따라 HAProxy host name 매개 변수를 수정해야 합니다.
2. 단일 ThingWorx Flow 엔진으로 ThingWorx 고가용성을 시작하려면 /ThingWorx-Flow-Dockerfiles-x-x-x/ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha로 이동하여 ./startImages-twx-ha-and-flow.sh 명령을 실행합니다.
3. Docker 이미지가 시작되어 실행되면 브라우저에서 https://haproxy:8443/Thingworx/Composer/로 이동합니다.
4. ThingWorx Composer에서 LoadOAuthConfiguration 서비스를 실행하여 OAuth를 ThingWorx Flow 서버에 로드합니다.
단일 ThingWorx Flow 엔진으로 ThingWorx 고가용성을 중지하려면 /ThingWorx-Flow-Dockerfiles-x-x-x/ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha로 이동하여 ./stopImages-twx-ha-and-flow.sh 명령을 실행합니다.
로그 보기
모든 로그를 보려면 다음 명령을 실행합니다.
docker compose -f <Docker Compose yml 파일 이름> logs -f
특정 컨테이너의 로그를 보려면 다음 명령을 실행합니다.
docker compose -f <Docker Compose yml 파일 이름> logs <컨테이너 이름>
로그를 닫으려면 CTRL+C를 입력합니다.
도움이 되셨나요?