Comments (7)
MY BAD
I forgot to add the $ symbol before the variables!
Sorry again, there was no bug!
Solution :
telegram:
image: danimart1991/jackett2telegram
container_name: Jackett-Telegram
environment:
- DELAY=60
- TOKEN=${telegram_bot_token}
- CHATID=${telegram_bot_chatid}
- LOG_LEVEL=debug
from jackett2telegram.
Hi @comassky.
I think your docker-compose.yml
file is not ok. You must use env_file
to use the .env
and not declare the enviroment variables in the compose file. Something like this:
version: "2"
services:
telegram:
image: danimart1991/jackett2telegram
container_name: Jackett-Telegram
hostname: jackett2telegram
env_file:
- ./.env
from jackett2telegram.
Thanks @danimart1991
Docker-compose uses by default the .env file or docker-compose.ini if it is present.
I have added the option, the error is still present.
telegram:
image: danimart1991/jackett2telegram
container_name: Jackett-Telegram
environment:
- DELAY=60
- TOKEN={telegram_bot_token}
- CHATID={telegram_bot_chatid}
- LOG_LEVEL=debug
env_file:
- ./.env
Same .env file
Traceback (most recent call last):
File "jackett2telegram.py", line 539, in <module>
main()
File "jackett2telegram.py", line 500, in main
updater = Updater(token=token, use_context=True)
File "/usr/local/lib/python3.7/site-packages/telegram/ext/updater.py", line 290, in __init__
else arbitrary_callback_data
File "/usr/local/lib/python3.7/site-packages/telegram/ext/extbot.py", line 103, in __init__
private_key_password=private_key_password,
File "/usr/local/lib/python3.7/site-packages/telegram/bot.py", line 191, in __init__
self.token = self._validate_token(token)
File "/usr/local/lib/python3.7/site-packages/telegram/bot.py", line 351, in _validate_token
raise InvalidToken()
telegram.error.InvalidToken: Invalid token
from jackett2telegram.
Hi again.
You are right. The env_file
is not necessary. Indeed, the enviroment
property and all its content must be removed from compose file and moved to .env
.
from jackett2telegram.
I don't really understand.
The .env file contains the key=value variables that can be used in the docker-compose.
The .env does not replace the environments tag, it completes it.
I use this mechanism for all my other containers (about 30)
from jackett2telegram.
Yes @comassky.
But the environment
field rules against the .env
. So if you declare TOKEN={telegram_bot_token}
in the compose file and TOKEN=1234
in the .env
file. TOKEN goes to have {telegram_bot_token} as value.
Edit: I see your last message.
My bad here maybe is use {telegram_bot_token}
in the documentation instead maybe something like <YourTelegramBotToken>
🤔
from jackett2telegram.
I think your documentation is OK.
It's my conversion from docker-run/start to docker-compose that is messed up, with the environment variables forgotten.
By the way, maybe can you add an example of docker-compose in the readme (i can give you mine) ?
from jackett2telegram.
Related Issues (16)
- the bot doesnt reply anything HOT 6
- ERROR: Indexer not available due to some issue: RARBG HOT 3
- [Reature Request] Could you add Heroku support? HOT 6
- Blackhole directory HOT 5
- Magnet link HOT 1
- telegram.utils error HOT 1
- ModuleNotFoundError: No module named 'telegram.utils' HOT 3
- Error after last update 1.12 HOT 2
- Doesn't check anything v 1.15 HOT 5
- RARBG HOT 5
- infohash to magnet HOT 2
- Error for Add any Rss HOT 2
- Wrong url at "link"
- what about Poster/image of Sites torrents? HOT 1
- Several security vulnerabilities HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jackett2telegram.