Don't auto update certain file in webhost + How to host discord bot

How would I make it so when I push a new commit to my repo, the specified file doesn’t get updated and it just stays the same how it is currently on render?

Also how would I host a discord bot using render. Everytime I try it says the deploy failed, I tried making it a flask app and used gunicorn but that also didn’t work.

Thank you

Hey there K.Dot,

That wouldn’t be something we support, we deploy a Github repo ‘as is’ and for it to be deployed into a service is HAS to exist in the Git repo. You could perhaps use a ‘disk’ attached to the service and in code check for the existence of the file there and read that file instead, but how you implement that is down to you.

For your bot question…

Bots are best deployed to us using a Background Service - these run persistently in the background and don’t expose any web server however, these service types aren’t available on the free plan.

If you try and run a bot via a Web Service, the deployment will probably fail, typically about 10 minutes after you’ve deployed it, and sometimes there are scenarios where 2 may be running for a period of time, this is down to our zero-downtime feature and not something that can be disabled.

We’ve been alerted to issues running Discord bots on us being rate limited by Discord, this is down to how traffic leaves our services - this may result in you receiving a 429 from Discord or having your requests rate limited - we’ve reached out to Discord but we don’t have a solution here yet.

If this doesn’t answer your question, just let us know, and we’ll try and help where we can


John B

Hi, John B,

After looking in the documentation I think I found what I was looking for. “Skipping an Auto-Deploy” it allows you to skip the deployment of certain files that you specify but I was wondering if you knew if this would be able to work how i’m intending. Like I said for example if you update a file while its being hosted then you update the repo and specify not to update that file would it stay changed? If so how do I specify “[render skip] Update README” when pushing commits through vscode? Sorry if this is a stupid question.

Thank you for your time,

No changes made to files written to the service that is not using an attached disk will be persisted.

John B

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.