Skip to content

Commit

Permalink
PMM-11180 update docker-compose.yml.
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk committed Oct 16, 2024
1 parent 6efc356 commit b59c08f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
15 changes: 13 additions & 2 deletions agent/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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}
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions agent/utils/tests/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit b59c08f

Please sign in to comment.