Giter VIP home page Giter VIP logo

Comments (10)

jimmybrancaccio avatar jimmybrancaccio commented on September 26, 2024 1

Hey @galexrt, yes absolutely. I meant to do that but I got sidetracked by a zillion other things haha

healthchecks/healthchecks#400

from container-healthchecks.

jimmybrancaccio avatar jimmybrancaccio commented on September 26, 2024 1

No, it is resolved, I just wanted to clarify I wasn't sending environment variables with the HC_ prefix 😝 I just use the HC_ prefix in my .env file to help differentiate everything else I have in the .env file.

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

@jimmybrancaccio Not really. Make sure you have followed https://github.com/healthchecks/healthchecks#telegram.

Also have you tried setting DEBUG: "true" as an env variable to see if there is any debug output?

Otherwise maybe check with the healthchecks/healthchecks project issue list / board and / or create an issue there about the 404 error.

from container-healthchecks.

jimmybrancaccio avatar jimmybrancaccio commented on September 26, 2024

Hey, sorry about the delay in getting back to you on this issue. Busy week! That said, it looks like an issue with the Healthchecks code, probably in hc/api/management/commands/settelegramwebhook.py.

Running a cURL command from the container allows it to work:

curl -F “url=https://<YOURDOMAIN.EXAMPLE>/<WEBHOOKLOCATION>" https://api.telegram.org/bot<YOURTOKEN>/setWebhook

I'll get an issue created on their GitHub repo.

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

@jimmybrancaccio Thanks for getting back to me and creating the upstream issue!

Feel free to mention and / or comment the upstream issue here.

from container-healthchecks.

jimmybrancaccio avatar jimmybrancaccio commented on September 26, 2024

Alright, so I think it was something in #19 that caused me to setup the ENV variable for my Telegram token as such:

HC_TELEGRAM_TOKEN=""123456789:AGHJDGHJD_HJAKJH8987dKJHKbb""

which didn't work, so I just removed the double double quotes:

HC_TELEGRAM_TOKEN=123456789:AGHJDGHJD_HJAKJH8987dKJHKbb

and re-reran the command and it worked fine at that point:

~ $ docker exec -it healthchecks /entrypoint.sh app:managepy settelegramwebhook

Running manage.py ...
/healthchecks/hc/settings.py:226: UserWarning: local_settings.py not found, using defaults
  warnings.warn("local_settings.py not found, using defaults")
Done, Telegram's webhook set to: https://healthchecks.linuxbox.ninja/integrations/telegram/bot/

So unless if I did the ENV variable wrong, we can consider this one a case closed.

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

@jimmybrancaccio Right, the env vars don't HC_ in front of them anymore as the healthchecks settings files now check the env vars for their vars.

from container-healthchecks.

jimmybrancaccio avatar jimmybrancaccio commented on September 26, 2024

@galexrt Ah my apologies, that was my .env output, not what I was actually sending to the container. My docker-compose.yml has:

- TELEGRAM_BOT_NAME=${HC_TELEGRAM_BOT_NAME}
- TELEGRAM_TOKEN=${HC_TELEGRAM_TOKEN}

and my .env file now has (without the double double quotes):

HC_TELEGRAM_BOT_NAME=MyBot
HC_TELEGRAM_TOKEN=123456789:AGHJDGHJD_HJAKJH8987dKJHKbb

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

@jimmybrancaccio So the issue is not resolved with using the env vars in the container without the HC_ prefix?

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

Go it, thanks for clarifying!

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.