diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1aaa020..73d70de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: - 5672:5672 - 15672:15672 mongodb: - image: mongo:3.7 + image: mongo:7.0.11 env: MONGO_INITDB_ROOT_USERNAME: guest MONGO_INITDB_ROOT_PASSWORD: guest diff --git a/README.md b/README.md index 45774ba..d3426b9 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ $ docker run -it --rm --name mongo \ -p 27017:27017 \ -e MONGO_INITDB_ROOT_USERNAME=guest \ -e MONGO_INITDB_ROOT_PASSWORD=guest \ - mongo:7.0.5 + mongo:7.0.11 ``` Now create a virtual environment, and install the server: diff --git a/compose.yml b/compose.yml index f94c304..fbd8b57 100644 --- a/compose.yml +++ b/compose.yml @@ -1,7 +1,9 @@ services: mongodb: - image: mongo:7.0.5 + image: mongo:7.0.11 + expose: + - ${MONGO_PORT} environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME} MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD} @@ -16,7 +18,7 @@ services: source: mongodb target: /data/db:Z healthcheck: - test: ["CMD", "mongosh", "localhost:27017/test", "--quiet"] + test: ["CMD", "mongosh", "localhost:${MONGO_PORT}/test", "--quiet"] sdx-lc: image: sdx-lc @@ -26,7 +28,7 @@ services: - 8080:8080 depends_on: mongodb: - # Anther condition is `service_healthy`, and it will require + # Another condition is `service_healthy`, and it will require # the `healthcheck` above. condition: service_started environment: @@ -36,7 +38,7 @@ services: - SDXLC_PORT=${SDXLC_PORT} # MongoDB settings. When using compose, we connect to the # mongodb service started by compose. - - MONGODB_CONNSTRING=mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@mongodb:27017/ + - MONGODB_CONNSTRING=mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@mongodb:${MONGO_PORT}/ - DB_NAME=${DB_NAME} - DB_CONFIG_TABLE_NAME=${DB_CONFIG_TABLE_NAME} # Message queue settings. diff --git a/tox.ini b/tox.ini index 299a8e9..d5e8e38 100644 --- a/tox.ini +++ b/tox.ini @@ -43,7 +43,7 @@ ports = healthcheck_cmd = rabbitmq-diagnostics -q ping [docker:mongo] -image = mongo:7.0.5 +image = mongo:7.0.11 ports = 27017:27017/tcp