Open gamberoillecito opened 6 months ago
@deptyped good news, I was able to deploy to Netlify without needing to edit anything but I don't know what to set the webhook url to, how can everything still work? What is the webhook for?
Loose steps I followed (let me know if you need precise steps):
readme
as if you wanted to setup everything locallydist
(web-app/dist
) folder when asked to do so by netlify.env
file and as WEB_APP_URL
use the url from step 4.bot
folder (src/bot
), this will host the botThanks for sharing! Unfortunately I don't have enough experience with Netlify. As far as I know, Netlify requires some Netlify-specific code to handle requests, and the bot will not work without code changes.
What is the webhook for?
To receive and process updates from Telegram. This is necessary for processing commands in the chat interface, such as /start
. If web app that can be launched with menu button is enough for you, you can skip the bot deployment.
In the case of Netlify, in BOT_WEBHOOK
you need to set url to the Netlify Function that runs the bot (not the web app).
6. Create another website in netlify in the same way as before but this time drag and drop the
bot
folder (src/bot
), this will host the bot
src/bot
is not enough, you need to deploy the entire repository (except web-app/
directory) to host the bot.
src/bot
is not enough, you need to deploy the entire repository (exceptweb-app/
directory) to host the bot.
Ok so basically the bot does not work in my case 🤣. I was a bit suspicious that everything worked without any intervention but I wasn't bothered to investigate more. I thought that since the button was working the bot had to work as well. I don't really need anything more than this.
Thank you very much again for you help
Hi, I've been trying to deploy the bot and web app on netlify but I'm having a hard time making everything work. Do you think that this can be done easily?
I think what is currently missing is a way to configure the variables in
.env
. I have no experience with netlify but it looks like it is possible to do something similar with anetlify.toml
file. I used this guide as a reference. Could it just be just a matter of swapping the.env
withnetlify.toml
?The other thing I currently do not understand is wether I can host both the bot and the webapp at the same time.
I think it could be really useful to be able to easily deploy you app with such a service and I might be happy to take a look into it if it's not too difficult.
Is there any easier solution available or something else that I'm missing?