{"id":18800814,"url":"https://github.com/bitovi/github-actions-docker-to-azure-vm","last_synced_at":"2026-03-09T19:02:19.801Z","repository":{"id":171731897,"uuid":"647416775","full_name":"bitovi/github-actions-docker-to-azure-vm","owner":"bitovi","description":"Stand up an Azure VM and run your Docker Compose on it.","archived":false,"fork":false,"pushed_at":"2025-01-28T11:39:07.000Z","size":38,"stargazers_count":5,"open_issues_count":9,"forks_count":2,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-27T08:45:13.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitovi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T18:30:44.000Z","updated_at":"2025-01-28T11:38:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"dec68e11-de5e-4086-8666-937511f5afe2","html_url":"https://github.com/bitovi/github-actions-docker-to-azure-vm","commit_stats":null,"previous_names":["bitovi/github-actions-docker-to-azure-vm"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fgithub-actions-docker-to-azure-vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fgithub-actions-docker-to-azure-vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fgithub-actions-docker-to-azure-vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fgithub-actions-docker-to-azure-vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitovi","download_url":"https://codeload.github.com/bitovi/github-actions-docker-to-azure-vm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248752434,"owners_count":21156088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T22:20:06.407Z","updated_at":"2026-03-09T19:02:14.759Z","avatar_url":"https://github.com/bitovi.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker to Azure VM\n\nGitHub action to deploy any [Docker](https://www.bitovi.com/academy/learn-docker.html)-based app to an Azure VM using Docker and Docker Compose.\n\nThe action will copy this repo to the VM and then run `docker-compose up`.\n![alt](https://bitovi-gha-pixel-tracker-deployment-main.bitovi-sandbox.com/pixel/wvxjqb_UAjCIhK7FcQ6Lr)\n## Getting Started Intro Video\n\n_Coming Soon_\n\n## Requirements\n\n1. Files for Docker\n2. An Azure account\n\n### 1. Files for Docker\n\nYour app needs a `Dockerfile` and a `docker-compose.yaml` file.\n\n\u003e For more details on setting up Docker and Docker Compose, check out Bitovi's Academy Course: [Learn Docker](https://www.bitovi.com/academy/learn-docker.html)\n\n### 2. An Azure account\n\nYou'll need Access Secrets from an Azure account. The best documentation on how to get started from a command-line perspective is here: https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli and https://learn.microsoft.com/en-us/cli/azure/manage-azure-subscriptions-azure-cli\n\n## Environment variables\n\nFor environment variables in your app, you can provide:\n\n- `repo_env` - A file in your repo that contains env vars\n- `ghv_env` - An entry in [Github actions variables](https://docs.github.com/en/actions/learn-github-actions/variables)\n- `dot_env` - An entry in [Github secrets](https://docs.github.com/es/actions/security-guides/encrypted-secrets)\n- `Azure_secret_env` - The path to a JSON format secret in Azure\n\nThen hook it up in your `docker-compose.yaml` file like:\n\n```yaml\nversion: '3.9'\nservices:\n  app:\n    env_file: .env\n```\n\nThese environment variables are merged to the .env file quoted in the following order:\n\n- Terraform passed env vars ( This is not optional nor customizable )\n- Repository checked-in env vars - repo_env file as default. (KEY=VALUE style)\n- Github Secret - Create a secret named DOT_ENV - (KEY=VALUE style)\n- Azure Secret - JSON style like '{\"key\":\"value\"}'\n\n## Example usage\n\nCreate `.github/workflow/deploy.yaml` with the following to build on push:\n\n### Basic example\n\n```yaml\nname: Basic deploy\non:\n  push:\n    branches: [ main ]\n\njobs:\n  Deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - id: deploy\n        uses: bitovi/github-actions-docker-to-azure-vm@v1\n        with:\n          AZURE_ARM_CLIENT_ID: ${{ secrets.AZURE_ARM_CLIENT_ID }}\n          AZURE_ARM_CLIENT_SECRET: ${{ secrets.AZURE_ARM_CLIENT_SECRET }}\n          AZURE_ARM_TENANT_ID: ${{ secrets.AZURE_ARM_TENANT_ID }}\n          AZURE_ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_ARM_SUBSCRIPTION_ID }}\n          azure_resource_identifier: 'my-resource-group'\n          AZURE_STORAGE_ACCOUNT: 'mystorageaccount'\n          tf_state_bucket: 'my-state-bucket'\n          stack_destroy: 'false'\n```\n\n### Advanced example\n\n```yaml\nname: Advanced deploy\non:\n  push:\n    branches: [ main ]\n\npermissions:\n  contents: read\n\njobs:\n  EC2-Deploy:\n    runs-on: ubuntu-latest\n    environment:\n      name: ${{ github.ref_name }}\n      url: ${{ steps.deploy.outputs.vm_url }}\n    steps:\n    - id: deploy\n      name: Deploy\n      uses: bitovi/github-actions-docker-to-azure-vm@v1\n      with:\n        AZURE_ARM_CLIENT_ID: ${{ secrets.AZURE_ARM_CLIENT_ID }}\n        AZURE_ARM_CLIENT_SECRET: ${{ secrets.AZURE_ARM_CLIENT_SECRET }}\n        AZURE_ARM_TENANT_ID: ${{ secrets.AZURE_ARM_TENANT_ID }}\n        AZURE_ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_ARM_SUBSCRIPTION_ID }}\n        Azure_default_region: eastus\n        tf_state_bucket: 'my-state-bucket'\n        dot_env: ${{ secrets.DOT_ENV }}\n        ghv_env: ${{ vars.VARS }}\n        app_port: 3000\n        additional_tags: \"{\\\"key1\\\": \\\"value1\\\",\\\"key2\\\": \\\"value2\\\"}\"\n```\n\n## Need help or have questions?\n\nThis project is supported by [Bitovi, a DevOps Consultancy](https://www.bitovi.com/devops-consulting) and a proud supporter of Open Source software.\n\nYou can **get help or ask questions** on our [Discord channel](https://discord.gg/zAHn4JBVcX)! Come hang out with us!\n\nOr, you can hire us for training, consulting, or development. [Set up a free consultation](https://www.bitovi.com/devops-consulting).\n\n## Made with BitOps\n\n[BitOps](https://bitops.sh) allows you to define Infrastructure-as-Code for multiple tools in a central place.  This action uses a BitOps [Operations Repository](https://bitops.sh/operations-repo-structure/) to set up the necessary Terraform and Ansible to create infrastructure and deploy to it.\n\n## Contributing\n\nWe would love for you to contribute to this repo!\n\nWould you like to see additional features?  [Create an issue](https://github.com/bitovi/github-actions-docker-to-azure-vm/issues/new) or feel free to branch and submit a PR! We love discussing newsolutions!\n\n## License\n\nThe scripts and documentation in this project are released under the [MIT License](https://github.com/bitovi/github-actions-docker-to-azure-vm/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitovi%2Fgithub-actions-docker-to-azure-vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitovi%2Fgithub-actions-docker-to-azure-vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitovi%2Fgithub-actions-docker-to-azure-vm/lists"}