bitovi/Deploy Docker to Azure VM
Deploy a Docker app to an Azure VM with Docker Compose
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit Jan 28, 2025
- License
- MIT
Pinned Snippet
uses: bitovi/github-actions-docker-to-azure-vm@1db17ab939fd3b875e179040af5f0af489831a49 # v1.0.2tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| AZURE_ARM_CLIENT_ID | Azure client ID | yes | — |
| AZURE_ARM_CLIENT_SECRET | Azure client secret | yes | — |
| AZURE_ARM_SUBSCRIPTION_ID | Azure subscription ID | yes | — |
| AZURE_ARM_TENANT_ID | Azure tenant ID | yes | — |
| AZURE_DEFAULT_REGION | Azure default region | yes | eastus |
| AZURE_STORAGE_ACCOUNT | Azure storage account name | yes | bitops |
| AZURE_STORAGE_SKU | Azure storage account SKU | yes | Standard_LRS |
| tf_state_bucket | Backend Bucket to use for Terraform state. Defaults to `${org}-${repo}-{branch}-tf-state` | yes | — |
| tf_state_bucket_destroy | Force purge and deletion of bucket on destroy. Any file contained there will be destroyed. `stack_destroy` must also be `true` | no | true |
| azure_resource_identifier | Set to override the Azure resource identifier for the deployment. Defaults to `${org}-{repo}-{branch}`. Use with destroy to destroy specific resources. | yes | — |
| azure_vm_admin_username | Set to override the Azure VM username for the deployment. Defaults to `ubuntu`. | yes | ubuntu |
| azure_vm_admin_password | Set to override the Azure VM password for the deployment. Defaults to `insecurePasswordABC123@`. Prefer GH Secrets. | yes | insecurePasswordABC123@ |
| docker_full_cleanup | Set to true to run docker-compose down and docker system prune --all --force --volumes after. | no | — |
| app_directory | Relative path for the directory of the app (i.e. where `Dockerfile` and `docker-compose.yaml` files are located). This is the directory that is copied to the EC2 instance. Default is the root of the repo. Add a .gha-ignore file with a list of files to be exluded. | — | — |
| app_directory_cleanup | Will generate a timestamped compressed file and delete the app repo directory. | no | — |
| app_port | Port to expose for the app | no | — |
| lb_port | Load balancer listening port. Defaults to 80 if NO FQDN provided, 443 if FQDN provided | no | — |
| lb_healthcheck | Load balancer health check string. Defaults to HTTP:app_port | no | — |
| stack_destroy | Set to "true" to Destroy the stack. Will delete the elb_logs bucket after the destroy action runs. | no | false |
| domain_name | Define the root domain name for the application. e.g. app.com | no | — |
| sub_domain | Define the sub-domain part of the URL. Defaults to `${org}-${repo}-{branch}` | — | — |
| root_domain | Deploy to root domain. Will generate two DNS recrods, one for root, another for www | no | — |
| cert_arn | Define the certificate ARN to use for the application | no | — |
| create_root_cert | Generates and manage the root cert for the application | no | — |
| create_sub_cert | Generates and manage the sub-domain certificate for the application | no | — |
| no_cert | Makes the application not to use a certificate by disabling certificate lookup. | no | — |
| targets | A list of targets to create before the full stack creation. Example: ` | — | — |
| additional_tags | A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` | no | — |
| application_mount_target | Directory path in application env to mount directory, default is `data` | — | data |
| data_mount_target | Directory path within docker env to mount directory to, default is `/data` | — | — |
| DEBUG_MODE | Set to "true" to enable debug mode | no | false |
| BITOPS_IMAGE | Set to override the BitOps image to use for the deployment. Defaults to `bitovi/bitops:latest`. | no | bitovi/bitops:latest |
Outputs
| name | description |
|---|---|
| vm_url | The URL of the generated app |