![]() Run flyctl auth token to get a Fly API token. ![]() You can find the video for this part here: To deploy further versions, you can run flyctl deploy or see below for automatic deploys from GitHub. See fly.io/docs/reference/secrets/#setting-secr. This will include all environment variables, for example: flyctl secrets set DISCORD_TOKEN=My. LOG_CHANNEL_ID=1234567890 env or configuration files, you will need to set secrets for fly.io to know about. If you will be deploying your bot without your. Once it is completed, your bot will be running on Fly.io! 6. Type flyctl deploy to deploy the first version! This will create a fly.toml, but you can delete most of it so that it looks similar to this: app = "my-bot-name" kill_signal = "SIGINT" kill_timeout = 5 processes = Give your project a name, type Y or N depending on if you want a Postgresql database or not, type N to not have it deploy. (Poetry Dockerfile is based on this tutorial by ) 4. RUN poetry config virtualenvs.create false & & poetry install -no -interaction -no -ansi If you are using Poetry for dependencies, your Dockerfile will look more like this: FROM python: 3.10 If your bot starts in a different file, you should change that here. In this case python bot.py is the command used to run the bot. To tell Fly.io to install these dependencies, create a file called Dockerfile (no file extension) with the following contents: FROM python: 3.10 You can find out what you have installed using pip freeze.ĭiscord.py example: discord.py>= 2. Add a Dockerfile with the Python version and dependency install method Method 1: requirements.txtĬreate a list of your dependencies in a requirements.txt. If you already have an account, you can use flyctl auth login. Use flyctl auth signup to launch your browser and complete the account creation steps. Create an account by running flyctl auth signup and finishing through the browserĪfter installing flyctl, you should now be able to use it in the command line. More info: fly.io/docs/getting-started/installing-flyctl 2. Run the package installer: yay -S flyctl-bin Run the Powershell install script: iwr -useb | iex ![]() If not, you can run the install script: curl -L | sh If you have the Homebrew package manager installed, flyctl can be installed by running: brew install flyctl ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |