Giter Club home page Giter Club logo

Comments (4)

heycalmdown avatar heycalmdown commented on August 16, 2024 1

nice

from mongo-cluster-docker.

senssei avatar senssei commented on August 16, 2024

Yep, you are right.

Because in official mongo images there isn't curl included https://github.com/docker-library/mongo/blob/master/3.4/Dockerfile .

This code is leftover from my early experimentation with custom mongo images. It's not required anymore. I've end up with going around this problem. Simply by trick with simply:

  • adding dependency with depends_on:,
  • not putting restart: always on mongo-xxx-setup

It's working like a charm.

But, you can easily add curl

docker run -it --rm  mongo bash

and then

apt-get update && apt-get install curl

or create own image with curl included (with Dockerfile).

l was planning rewrite it with docker HEALTHCHECK support, so pull requests are welcome.

from mongo-cluster-docker.

senssei avatar senssei commented on August 16, 2024

Added healthcheck using plain mongo without any need for curl.

echo "Waiting for startup.."
until mongo --host ${mongodb1}:${port} --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' &>/dev/null; do
  printf '.'
  sleep 1
done

Please see latest release https://github.com/senssei/mongo-cluster-docker/releases/tag/v1.0.0

from mongo-cluster-docker.

senssei avatar senssei commented on August 16, 2024

Done.

from mongo-cluster-docker.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.