Deploy#
The deploy operation creates the necessary infrastructure and uploads the build package - i.e. your code - on the infrastructure.
Usage#
$ # Deploy the local application.
$ weblodge deploy
$ # Deploy the local application with a custom subdomain.
$ weblodge deploy --subdomain myapp
Options#
Option name |
Description |
Default value |
---|---|---|
subdomain |
The subdomain of the application on the Internet: <subdomain>.azurewebsites.net. Randomly generated if not provided. |
<randomly generated> |
tier |
The application computational power name. |
F1 |
location |
The physical application location. |
northeurope |
environment |
The environment of your application. |
production |
build |
Build the application before deployment. |
false |
dist |
Folder containing the application built. |
dist |
env-file |
Path to the environment file. |
.env |
Note
WebLodge considers the subdomain as the application name.
Environment variables#
If your application needs environment variables, you can provide them in a .env file or by providing the –env-file option.
$ # Deploy the local application using the '.env' file.
$ cat .env
MY_VAR=foo
$ weblodge deploy
$ # Deploy the local application with a custom file containing environment variables.
$ cat prod.env
MY_VAR=foo
$ weblodge deploy --env-file prod.env
Note
WebLodge is using the python-dotenv package to load environment variables and so support all it functionality.
Note
WebLodge creates an Azure Key Vault and provides permissions to the deployer (ex: the GitHub Action) to set secrets and to the Azure WebApp running the application to read them. Azure Key Vault is not a free service, but in this context the cost is almost zero. Indeed, the cost is based on the number of operations. In this case, the number of operations is equal to the number of secrets by the number of restarts of the application and deployment. You can find more information on the Azure Key Vault pricing page.
Building during deployment#
You can build and then deploy your application by providing the –build option. If you need to specify more options, you can add all the Build options.
$ # Build then deploy the local application.
$ weblodge deploy --build
$ # Build the application with a custom folder then deploy.
$ weblodge deploy --build --src myapp