Giter VIP home page Giter VIP logo

Comments (27)

galexrt avatar galexrt commented on September 27, 2024 3

@Braintelligence ping

from container-healthchecks.

galexrt avatar galexrt commented on September 27, 2024

@Braintelligence You just the variable name and add HC_ before and add it to the environment variables.
Example:

  • TELEGRAM_BOT_NAME -> env var HC_TELEGRAM_BOT_NAME

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Oh sorry, I thought only stuff worked, that was explicitly mentioned in the entrypoint.sh

from container-healthchecks.

galexrt avatar galexrt commented on September 27, 2024

I may need to add the variables that are "special" cases (integer, arrays) but overall that should work for most config options.

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Do I need to use string brackets for those variables on the right side?

from container-healthchecks.

galexrt avatar galexrt commented on September 27, 2024

For string values not, quotes are added around your variable, see https://github.com/galexrt/docker-healthchecks/blob/master/entrypoint.sh#L75

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

What would be the easiest way to check the contents of the settings.py currently? There's no nano or vim available in the container T_T

from container-healthchecks.

galexrt avatar galexrt commented on September 27, 2024

Use cat PATH_TO_SETTINGS_PY, less or more (depending on which is installed, cat should be installed).

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Hm, the settings.py seems to be correct but the Telegram Bot doesn't react =/... I can't seem to find any debugging info.

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Same for mail, actually. I can't see any errors in the container logs but mails aren't being sent.

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

@galexrt I want to set DEBUG = False in the settings.py but you already have DEBUG in there resulting in a server error if I do this by HC_DEBUG = False

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Also it seems that the settings are just copied at the end of the settings.py ... does this work that way? Theoretically you can overwrite variables by just setting it anew, but this creates a lot of spam in the settings.py

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Oooooh, wait a second. I think those come from upgrading the container with new environment variables.

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Did you create the container in such a way, that if it is restarted with new environment variables, it would just put them under the settings.py without checking if they were already set?

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Yeah, overwriting of the variables works, but it seems you can't do:
DEBUG = True
then
DEBUG = False
you get HTTP 500 then.

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Actually you get HTTP 500 if setting DEBUG = False in every case... I need to find out if you can even do runserver without it.

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

More info here:
healthchecks/healthchecks#115 (comment)

Maybe we should have this command be invokable by docker, without going into the container.

from container-healthchecks.

galexrt avatar galexrt commented on September 27, 2024

There is a way to invoke manage.py commands through the entrypoint.sh, but it isn't documented, could you create a separate issue to document that?

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Done

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

This is something I might work on in a later PR, if it's ok with you we can keep this open until then.

from container-healthchecks.

galexrt avatar galexrt commented on September 27, 2024

@Braintelligence Yes, is it okay if I assign this issue to you then?

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Sure

from container-healthchecks.

galexrt avatar galexrt commented on September 27, 2024

@Braintelligence Any news on this?

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

Oh wow, I'm sorry for not reacting to your comments O_O.

I get flooded with GitHub mails so much due to Mailcow, that I missed this entirely.

I just stumbled on this because I moved my healthcheck stack from one server to another. Is this here still a thing?

from container-healthchecks.

galexrt avatar galexrt commented on September 27, 2024

@Braintelligence Yes, this project is still a thing. I had hoped you work on the PR for this feature as you commented earlier.

What is the status on your side?

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 27, 2024

@galexrt Hey, currently I'm super busy. No free time I'm afraid :(. By "here" I meant the this ticket btw.

from container-healthchecks.

galexrt avatar galexrt commented on September 27, 2024

Closing as the healthchecks project uses env vars to read its config from.

from container-healthchecks.

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.