diff --git a/docker-compose.yaml b/docker-compose.yaml index 580fe57..5bb0d9a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,7 +6,7 @@ services: mongo: image: "${MONGO_IMAGE}" container_name: mongo - command: ["/bin/bash", "-c", "/docker-entrypoint-initdb.d/mongo-init.sh; docker-entrypoint.sh mongod --wiredTigerCacheSizeGB 1 --auth"] + command: ["/bin/bash", "-c", "docker-entrypoint.sh mongod --wiredTigerCacheSizeGB 1 --auth & /docker-entrypoint-initdb.d/mongo-init.sh; wait"] volumes: - "${DATA_DIR}/components/mongodb/data/db:/data/db" - "${DATA_DIR}/components/mongodb/data/logs:/data/logs" diff --git a/scripts/mongo-init.sh b/scripts/mongo-init.sh index 25bb2d6..968bc08 100755 --- a/scripts/mongo-init.sh +++ b/scripts/mongo-init.sh @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +echo "before running mongosh..." + mongosh <