Hosting a Python Discord Bot for Free with Fly.io
Intro
As Heroku is no longer going to be free after November 28, 2022, I am sharing another way to host a Discord bot 24/7 for free.
You will be able to host any kind of bot on Fly.io with few limitations by following the steps below. You can also op...
jonahlawrence.hashnode.dev4 min read
Great instructions! Unfortunately, they're not working for me at the moment.
I had to run:
flyctl launch --name --myappname --region sea --org myorgnameto actually launch the app successfully. Then when I try to deploy it, I get this error:
==> Building image with Docker --> docker host: 20.10.12 linux x86_64 Sending build context to Docker daemon 2.092kB Error failed to fetch an image or build from source: error building: Error response from daemon: invalid reference formatNot entirely sure, but I'm assuming there's something wrong with the Dockfile. Here's all that's in mine:
FROM python:3.10 WORKDIR /bot COPY requirements.txt /bot/ RUN pip install -r requirements.txt COPY . /bot CMD python main.py