bitovi/Deploy Docker to Azure VM

Deploy a Docker app to an Azure VM with Docker Compose

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stalelast commit Jan 28, 2025
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: bitovi/github-actions-docker-to-azure-vm@1db17ab939fd3b875e179040af5f0af489831a49 # v1.0.2

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
AZURE_ARM_CLIENT_IDAzure client IDyes
AZURE_ARM_CLIENT_SECRETAzure client secretyes
AZURE_ARM_SUBSCRIPTION_IDAzure subscription IDyes
AZURE_ARM_TENANT_IDAzure tenant IDyes
AZURE_DEFAULT_REGIONAzure default regionyeseastus
AZURE_STORAGE_ACCOUNTAzure storage account nameyesbitops
AZURE_STORAGE_SKUAzure storage account SKUyesStandard_LRS
tf_state_bucketBackend Bucket to use for Terraform state. Defaults to `${org}-${repo}-{branch}-tf-state`yes
tf_state_bucket_destroyForce purge and deletion of bucket on destroy. Any file contained there will be destroyed. `stack_destroy` must also be `true`notrue
azure_resource_identifierSet 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_usernameSet to override the Azure VM username for the deployment. Defaults to `ubuntu`.yesubuntu
azure_vm_admin_passwordSet to override the Azure VM password for the deployment. Defaults to `insecurePasswordABC123@`. Prefer GH Secrets.yesinsecurePasswordABC123@
docker_full_cleanupSet to true to run docker-compose down and docker system prune --all --force --volumes after.no
app_directoryRelative 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_cleanupWill generate a timestamped compressed file and delete the app repo directory.no
app_portPort to expose for the appno
lb_portLoad balancer listening port. Defaults to 80 if NO FQDN provided, 443 if FQDN providedno
lb_healthcheckLoad balancer health check string. Defaults to HTTP:app_portno
stack_destroySet to "true" to Destroy the stack. Will delete the elb_logs bucket after the destroy action runs.nofalse
domain_nameDefine the root domain name for the application. e.g. app.comno
sub_domainDefine the sub-domain part of the URL. Defaults to `${org}-${repo}-{branch}`
root_domainDeploy to root domain. Will generate two DNS recrods, one for root, another for wwwno
cert_arnDefine the certificate ARN to use for the applicationno
create_root_certGenerates and manage the root cert for the applicationno
create_sub_certGenerates and manage the sub-domain certificate for the applicationno
no_certMakes the application not to use a certificate by disabling certificate lookup.no
targetsA list of targets to create before the full stack creation. Example: `
additional_tagsA JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`no
application_mount_targetDirectory path in application env to mount directory, default is `data`data
data_mount_targetDirectory path within docker env to mount directory to, default is `/data`
DEBUG_MODESet to "true" to enable debug modenofalse
BITOPS_IMAGESet to override the BitOps image to use for the deployment. Defaults to `bitovi/bitops:latest`.nobitovi/bitops:latest
namedescription
vm_urlThe URL of the generated app