bitovi/Deploy Docker App to GCP

Deploy a Docker app to a GCP Virtual Machine with Docker Compose

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stalelast commit Mar 29, 2023
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: bitovi/github-actions-deploy-docker-to-gcp@995b177b82397ce82c1f91c553b6e48d4bf9cbdc # no releases — HEAD as of 2026-07-11

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

namedescriptionrequireddefault
checkoutSpecifies if this action should checkout the codenotrue
gcp_project_idGCP Project IDyes
gcp_default_regionGCP default regionyesus-east-1
gcp_image_idGCP Machine Image ID. Will default to the latest Ubuntu 22.04 server image (HVM) no""
tf_state_bucketGCP Cloud Storage bucket to use for Terraform state. Defaults to `${org}-${repo}-{branch}-tf-state`no
tf_state_bucket_destroyForce purge and deletion of Cloud Storage bucket. Any file contained there will be destroyed. `stack_destroy` must also be `true`nofalse
repo_envFile containing environment variables to be used with the appnorepo_env
dot_env`.env` file to be used with the app from Github secretsno
ghv_env`.env` file to be used with the app from Github variablesno
aws_secret_envSecret name to pull env variables from GCP Secret Managerno""
app_portPort to expose for the appno3000
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
gcp_vm_instance_profileThe GCP IAM instance profile to use for the GCP VM instance
gcp_vm_instance_typeThe GCP Instance type or Machine FamilynoE2
stack_destroySet to "true" to Destroy the stack. Will delete the elb_logs bucket after the destroy action runs.
gcp_resource_identifierSet to override the GCP resource identifier for the deployment. Defaults to `${org}-{repo}-{branch}`. Use with destroy to destroy specific resources.
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
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.
create_keypair_sm_entryGenerates and manage a secret manager entry that contains the public and private keys created for the ec2 instance.nofalse
additional_tagsA list of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`no{}
namedescription
vm_urlThe URL of the generated app