GithubHelp home page GithubHelp logo

Comments (3)

horgh avatar horgh commented on May 21, 2024

Does it happen when you use docker run? Could it be that compose is restarting the exited container?

from geoipupdate.

loganmarchione avatar loganmarchione commented on May 21, 2024

Ah you're right. When I run this...

docker run --rm -it --name geoipupdate\
  --env GEOIPUPDATE_ACCOUNT_ID=XXXXXX \
  --env GEOIPUPDATE_LICENSE_KEY=XXXXXXXXXXXXXXXX \
  --env 'GEOIPUPDATE_EDITION_IDS=GeoLite2-ASN GeoLite2-City GeoLite2-Country' \
  --volume geoipupdate_data:/usr/share/GeoIP \
  maxmindinc/geoipupdate

...it runs once and exits.

# STATE: Creating configuration file at /etc/GeoIP.conf
AccountID XXXXXX
LicenseKey XXXXXXXXXXXXXXXX
EditionIDs GeoLite2-ASN GeoLite2-City GeoLite2-Country
# STATE: Running geoipupdate

What is the correct restart policy to run this with docker-compose? I tested on-failure (without setting GEOIPUPDATE_FREQUENCY) and I get an exit code of zero.
Exited (0) 2 minutes ago

So I'm assuming if you're using docker-compose, you need to either:

  • specify GEOIPUPDATE_FREQUENCY
    or
  • use restart: on-failure

from geoipupdate.

horgh avatar horgh commented on May 21, 2024

I'm not very familiar with compose, but it sounds like either of those options would be appropriate. I think it depends how you'd want to schedule the updates for your use case.

For the second option, presumably geoipupdate would never re-run until you restarted the compose application, unless there's another way to schedule it with compose. Kubernetes has the CronJob resource for example. I'm not sure if compose has something equivalent for controlling scheduling of containers itself.

from geoipupdate.

Related Issues (20)

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.