bitovi/Deploy Docker App to GCP
Deploy a Docker app to a GCP Virtual Machine with Docker Compose
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit Mar 29, 2023
- License
- MIT
Pinned Snippet
uses: bitovi/github-actions-deploy-docker-to-gcp@995b177b82397ce82c1f91c553b6e48d4bf9cbdc # no releases — HEAD as of 2026-07-11tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| checkout | Specifies if this action should checkout the code | no | true |
| gcp_project_id | GCP Project ID | yes | — |
| gcp_default_region | GCP default region | yes | us-east-1 |
| gcp_image_id | GCP Machine Image ID. Will default to the latest Ubuntu 22.04 server image (HVM) | no | "" |
| tf_state_bucket | GCP Cloud Storage bucket to use for Terraform state. Defaults to `${org}-${repo}-{branch}-tf-state` | no | — |
| tf_state_bucket_destroy | Force purge and deletion of Cloud Storage bucket. Any file contained there will be destroyed. `stack_destroy` must also be `true` | no | false |
| repo_env | File containing environment variables to be used with the app | no | repo_env |
| dot_env | `.env` file to be used with the app from Github secrets | no | — |
| ghv_env | `.env` file to be used with the app from Github variables | no | — |
| aws_secret_env | Secret name to pull env variables from GCP Secret Manager | no | "" |
| app_port | Port to expose for the app | no | 3000 |
| 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 | — |
| gcp_vm_instance_profile | The GCP IAM instance profile to use for the GCP VM instance | — | — |
| gcp_vm_instance_type | The GCP Instance type or Machine Family | no | E2 |
| stack_destroy | Set to "true" to Destroy the stack. Will delete the elb_logs bucket after the destroy action runs. | — | — |
| gcp_resource_identifier | Set to override the GCP resource identifier for the deployment. Defaults to `${org}-{repo}-{branch}`. Use with destroy to destroy specific resources. | — | — |
| 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 | — |
| 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. | — | — |
| create_keypair_sm_entry | Generates and manage a secret manager entry that contains the public and private keys created for the ec2 instance. | no | false |
| additional_tags | A list of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` | no | {} |
Outputs
| name | description |
|---|---|
| vm_url | The URL of the generated app |