アーティクル - CS327927
docker-compose-postgres.yml ファイルのドキュメントに従って Docker PostgreSQL ボリュームをマッピングすると、Ubuntu で異常なコンテナが作成される
修正日: 21-Feb-2024
適用対象
- ThingWorx Platform 8.5 to 9.3
- Ubuntu
説明
- docker-compose-postgres.ymlファイルのドキュメントに従って Docker PostgreSQL ボリュームをマッピングすると、異常なコンテナが作成される
- 次のdocker-compose-postgres.ymlで docker-compose を使用すると、異常なコンテナが作成されます。
version: '2.2'
services:
postgresql:
image: thingworx/postgres-db:latest
ports:
- "5432"
healthcheck:
test: pg_isready -U postgres
interval: 15s
environment:
- "POSTGRES_USER=postgres"
- "POSTGRES_PASSWORD=<Password>"
- "POSTGRES_DB=postgres"
# NOTE: Set TWX_DATABASE_USERNAME, TWX_DATABASE_PASSWORD TWX_DATABASE_SCHEMA for
# the thingworx database setup that will be created in this database.
- "TWX_DATABASE_USERNAME=twadmin"
- "TWX_DATABASE_SCHEMA=twadmin"
- "TWX_DATABASE_PASSWORD=<Password>"
volumes:
- "./thingworx-postgres-storage/ThingworxPostgresqlStorage:/ThingworxPostgresqlStorage"
- "./thingworx-postgres-storage/postgres-data:/var/lib/postgresql/data"
platform:
image: thingworx/platform-postgres:latest
healthcheck:
test: curl -f localhost:8080/Thingworx/health
interval: 15s
depends_on:
postgresql:
condition: service_healthy
ports:
- "8081:8080"
- "8443:8443"
environment:
- "ENABLE_CLUSTERED_MODE=false"
- "INITIAL_HEAP=2"
- "MAX_HEAP=4"
- "DATABASE_HOST=postgresql"
- "DATABASE_PORT=5432"
- "DATABASE_ADMIN_USERNAME=postgres"
- "DATABASE_ADMIN_PASSWORD=<Password>"
- "DATABASE_ADMIN_SCHEMA=postgres"
# NOTE: Set TWX_DATABASE_USERNAME, TWX_DATABASE_PASSWORD TWX_DATABASE_SCHEMA for
# the thingworx database setup that will either be created by the docker image,
# or connected to if it already exists.
- "TWX_DATABASE_USERNAME=twadmin"
- "TWX_DATABASE_SCHEMA=twadmin"
- "TWX_DATABASE_PASSWORD=<Password>"
# NOTE: The following must be set for the Platform to start. This will be
# the initial Administrator password.
- "THINGWORX_INITIAL_ADMIN_PASSWORD=<Password>"
- "ENABLE_HTTP=true"
- "ENABLE_HTTPS=false"
volumes:
- "./thingworx-postgres-storage/ThingworxPlatform:/ThingworxPlatform"
- "./thingworx-postgres-storage/ThingworxStorage:/ThingworxStorage"
- "./thingworx-postgres-storage/ThingworxBackupStorage:/ThingworxBackupStorage"
- "./thingworx-postgres-storage/tomcat-logs:/opt/apache-tomcat/logs"
- postgresコンテナがエラーを報告する
database “thingworx” does not exist
最新バージョンはこちらを参照ください CS327927