Infrastructure > Basics
Introduction
Learn what are deployments and how they work with Webiny.
- what does it mean to deploy a project application
- what does it mean to deploy a Webiny project
This key topics section provides general information on deployments, how they work in a Webiny project, what are environments, and other relevant topics. If you just want to learn how to deploy your project using Webiny CLI, please visit the Deploy your project guide.
Overview
Project deployment is an important part of an application development lifecycle.
Essentially, deploying your project entails the deployment of necessary cloud infrastructure resources with the application code you wrote. It can be done from your machine directly, which is usually the case when developing, or from a remote environment, for example CI/CD systems, that, based on provided instructions, deploy your project automatically for you.
Whatever the case, Webiny makes it easy to both build and deploy your project, using the Webiny CLI and Pulumi as the default infrastructure as code and deployment solution. Additionally, without any special configuration, you can also easily deploy your project into multiple environments.
After a new Webiny project was set up, the next step is to deploy it. Learn what gets deployed into the cloud (your AWS account) and how it all works in the Cloud Infrastructure key topics section.
Deploying Project Applications - Not Projects
As explained in the Project Applications and Packages section, every Webiny project can consist of one or more project applications. Furthermore, every project application consists of application code and the necessary infrastructure that’s needed in order to run it.
With that in mind, it’s important to note that when talking about deployments, we’re talking about deploying project applications, not projects. Meaning, if your project consisted of three project applications, in order to deploy the project completely, you would need to execute three separate Webiny CLI commands.
If you just want to learn how to deploy your project using Webiny CLI, please visit the Deploy your project guide.
Dependent Project Applications
As stated in the section above, fully deploying a Webiny project entails deploying all of its project applications.
Although it might sound simple enough, one thing we still have to take into consideration are dependent applications. In the Project Applications and Packages key topic, it’s shown that applications can be dependent on each other. For example, if we had two applications, where one represents an HTTP API, and the other a React application that relies on the API, that means the former needs to be deployed before the latter. We can’t deploy a React application and expect it to work if we don’t know the URL of the API to which it needs to talk to.
So, as we can see, the order of deploying does matter.
This is the reason why, out of the box, Webiny does not provide any CLI commands for complete project deployment. The order is something Webiny cannot predict and it’s up to the developers to come up with a process for complete project deployment if need be.
Still, to make it a bit easier for new users, every new Webiny project does include a helper yarn webiny deploy
command. This command deploys the three applications that are included in a Webiny project by default. To learn more, visit the Deploy your project guide.
FAQ
What Does Webiny Use to Deploy Cloud Infrastructure?
Webiny uses Pulumi, a modern infrastructure as code solution. Find out more in the following IaC with Pulumi key topic.
Is There a Built-in Command That Destroys the Whole Project?
At the moment, there is not. To do that, run separate webiny destroy
commands on each project application. Please visit the Deploy your project guide to learn more.