diff --git a/agent/docker-compose.yml b/agent/docker-compose.yml index 43934865dd..927e29f2be 100644 --- a/agent/docker-compose.yml +++ b/agent/docker-compose.yml @@ -50,7 +50,10 @@ services: mongo: image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} container_name: pmm-agent_mongo - command: --profile 2 + platform: linux/amd64 + command: + - --profile 2 + - -bind_ip=0.0.0.0 ports: - "127.0.0.1:27017:27017" environment: @@ -60,12 +63,14 @@ services: mongo_with_ssl: image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} container_name: pmm-agent_mongo_with_ssl + platform: linux/amd64 command: - --profile=2 - --sslMode=requireSSL - --sslPEMKeyFile=/etc/ssl/certificates/server.pem - --sslCAFile=/etc/ssl/certificates/ca.crt - --sslWeakCertificateValidation + - -bind_ip=0.0.0.0 ports: - "127.0.0.1:27018:27017" volumes: @@ -74,13 +79,17 @@ services: mongonoauth: image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} container_name: pmm-agent_mongonoauth - command: --profile 2 + platform: linux/amd64 + command: + - --profile 2 + - -bind_ip=0.0.0.0 ports: - "127.0.0.1:27019:27017" mongo_repl: image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} container_name: pmm-agent_mongorepl + platform: linux/amd64 environment: - MONGO_IMAGE=${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} volumes: @@ -93,6 +102,7 @@ services: mongo_repl_with_ssl: image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} container_name: pmm-agent_mongorepl_with_ssl + platform: linux/amd64 command: /scripts/mongo_repl_with_ssl.sh environment: - MONGO_IMAGE=${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} @@ -106,6 +116,7 @@ services: postgres: image: ${POSTGRES_IMAGE:-postgres:11} container_name: pmm-agent_postgres + platform: linux/amd64 command: > -c shared_preload_libraries='${PG_PRELOADED_LIBS:-pg_stat_statements}' -c track_activity_query_size=2048 diff --git a/agent/utils/tests/mongodb.go b/agent/utils/tests/mongodb.go index 7c7d9741c4..f1c069f60f 100644 --- a/agent/utils/tests/mongodb.go +++ b/agent/utils/tests/mongodb.go @@ -36,7 +36,7 @@ func GetTestMongoDBDSN(tb testing.TB) string { if testing.Short() { tb.Skip("-short flag is passed, skipping test with real database.") } - return "mongodb://root:root-password@127.0.0.1:27017/admin" + return "mongodb://root:root-password@localhost:27017/admin" } // GetTestMongoDBReplicatedDSN returns DNS for replicated MongoDB test database. @@ -45,7 +45,7 @@ func GetTestMongoDBReplicatedDSN(tb testing.TB) string { if testing.Short() { tb.Skip("-short flag is passed, skipping test with real database.") } - return "mongodb://127.0.0.1:27020,127.0.0.1:27021/admin?replicaSet=rs0" + return "mongodb://localhost:27020,127.0.0.1:27021/admin?replicaSet=rs0" } // GetTestMongoDBWithSSLDSN returns DNS template and files for MongoDB test database with ssl.