A Telegram bot for accessing stock price data
In this repository, in the infra folder, the necessary files are provided to deploy the generated Docker image to an Azure Container Instance by following the steps below.
If you do not have OpenTofu installed, you can do so by following the instructions described in the tool's documentation: Installing OpenTofu
-
If you do not have AZ Cli installed, you can do so by following the instructions described in the tool's documentation: How to install the Azure CLI
-
Log in to your Azure account using one of the available authentication methods (Sign in with Azure CLI) and make sure you have selected the subscription where you want to deploy StockBot.
Follow the steps described in the tutorial to create a bot token and obtain its token. Obtain Your Bot Token
Once OpenTofu is installed and AZ is logged in your Azure account, we will go to the infra folder and follow the next steps:
-
Use the files secrests.tfvars.example and vars.tfvars.example as templates to create your own secrests.tfvars and vars.tfvars.
-
[This step is only necessary the first time] Initialize your OpenTofu environment:
$ tofu init
-
Create the deployment plan:
$ tofu plan -out main.tfplan -var-file="secrets.tfvars" -var-file="vars.tfvars"
If you are sure that the proposed plan is what you want to execute, continue to the next point.
-
Execute your deployment plan:
$ tofu apply main.tfplan