Deploying - using CLI
Prerequisites
To deploy a git project using Stacktape:
You must have a Stacktape account. If you don't have an account, please sign up
You must have an AWS account connected to your Stacktape organization. Connecting your account takes ~2 minutes. You can connect the account on AWS accounts page in the console
1. Install Stacktape
Copy
iwr https://installs.stacktape.com/windows.ps1 -useb | iex
After the installation is complete, you might need to manually add Stacktape bin folder to PATH environment variable. To do it, follow the instruction printed to the terminal.
1.1 Log in to Stacktape
You can login to Stacktape using simple command:
Copy
stacktape login
This command will prompt you for your Stacktape API key. You can get it on API keys page in the console.
2. Configure your stack
You need to create a configuration file named stacktape.yml
or stacktape.ts
in the root directory of your project.
If you already have it, you can continue with 3. Deploy step.
If you do not have it yet, you have multiple options:
(Recommended) Use the interactive config editor. To learn about how to use it, head over to using the config editor.
Use a starter projects with a pre-configured Stacktape configuration.
Follow one of the step-by-step tutorials. Currenctly available tutorials are Fullstack Next.js T3 app and Web API.
Write the config manually. To make this process easier, you can install Stacktape VScode extension.
3. Deploy
Once you've successfully configured your stack, you can deploy it very easily - by a single command:
Copy
stacktape deploy --region <<region> --stage <<stage>> --projectName <<projectName>>
The arguments required by the command have the following meaning:
- region - the code of one of the
33 available AWS regions.
For people in US, this will be likely
us-east-1
, and for EU customerseu-west-1
. - stage - arbitrary name of the stage (also called environment). E.g.
production
,staging
ordev-john
. - projectName - name of the project this stack will belong to. This is used to distinguish your projects from each
other in the Stacktape console. Use arbitrary, descriptive name, e.g.
todo-app
,pet-eshop
, etc. In most cases, this is identical with the name of the git repository.
3.1 - Monitor the deployment
Stacktape continuously prints the information about the ongoing deployment to your terminal.
Once the deployment is finished, you'll be able to view the stack details in the Stacktape console.
At this point, you have a successfully deployed, production-grade AWS application, that follows all of the recommended AWS best practices.