{"id":19834861,"url":"https://github.com/jamesalbert/deploy-unity","last_synced_at":"2026-04-08T22:31:26.323Z","repository":{"id":148569534,"uuid":"132215300","full_name":"jamesalbert/deploy-unity","owner":"jamesalbert","description":"Deploy your Unity WebGL game to Amazon's Elastic Container Service","archived":false,"fork":false,"pushed_at":"2018-05-07T01:38:32.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-21T03:42:45.938Z","etag":null,"topics":["aws","bash","ecr","ecs","unity3d","virtual-environments"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesalbert.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":"2018-05-05T04:40:58.000Z","updated_at":"2019-04-25T14:13:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"46e0a78a-6e95-4ae9-8057-d29fa6eabaf6","html_url":"https://github.com/jamesalbert/deploy-unity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jamesalbert/deploy-unity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesalbert%2Fdeploy-unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesalbert%2Fdeploy-unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesalbert%2Fdeploy-unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesalbert%2Fdeploy-unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesalbert","download_url":"https://codeload.github.com/jamesalbert/deploy-unity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesalbert%2Fdeploy-unity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31577444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws","bash","ecr","ecs","unity3d","virtual-environments"],"created_at":"2024-11-12T12:05:47.176Z","updated_at":"2026-04-08T22:31:26.300Z","avatar_url":"https://github.com/jamesalbert.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deploy-unity\n\n![](https://d2908q01vomqb2.cloudfront.net/cb4e5208b4cd87268b208e49452ed6e89a68e0b8/2018/02/28/Unity.jpg)\n\nDeploy your Unity WebGL game to Amazon's Elastic Container Service using this handy-dandy virtual environment.\n\n\n## How to Deploy Unity Builds\n\n\n### Dependencies\n\n  - aws-cli\n  - ecs-cli\n  - jq\n\n\n### Things you need:\n\n  - a domain ([guide](https://aws.amazon.com/getting-started/tutorials/get-a-domain/))\n  - a TLS certificate ([guide](https://aws.amazon.com/blogs/aws/new-aws-certificate-manager-deploy-ssltls-based-apps-on-aws/))\n  - an ECS cluster ([guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create_cluster.html)) and service ([guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-service.html))\n    - name your service with the name you will set in `config.json`\n    - recommended: set your service behind an ALB ([guide](https://aws.amazon.com/blogs/compute/microservice-delivery-with-amazon-ecs-and-application-load-balancers/))\n\n\nCreate a CNAME under your domain that points to the ALB ([guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-elb-load-balancer.html)). Use the TLS certificate to encrypt the traffic between the client and the ALB ([guide](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html)). Then configure a target group to forward traffic to your service's tasks ([guide](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html)). This tool doesn't touch on any of these things, but you should have this setup before hosting a game.\n\nLast thing to note is to ensure that the ECS task role you use have ecr:* and logs:* permissions. It doesn't have to be *that* open, but  ¯\\\\\\_(ツ)\\_/¯.\n\n### Configuration\n\nBefore you begin, be sure to have aws-cli and ecs-cli configured. If you don't already, follow this [guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) for aws-cli, and this [guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_Configuration.html) for ecs-cli.\n\nOnce that's done, the first thing you need to do is fill out `config.json`:\n\n  - build_dir: build directory (where you built to from Unity)\n  - name: the name for your ECR repository, task definition, and service\n  - tag: tag your deploy (usually \"latest\")\n  - cluster: name of your cluster\n  - network_mode: bridge, host, awsvpc, or none\n  - task_role_arn: role arn the containers will assume\n  - execution_role_arn: role arn that container agents and docker daemon will assume\n  - network_mode: bridge, host, awsvpc, or none (not implemented, uses default)\n  - cpu: CPU units\n  - memory: MiB units\n\n\n### Deploying\n\nReminder: you must have a cluster and service ready before deployment.\n\nIf you're ready to go, here are the steps:\n  - In Unity:\n    - click File\u003eBuild Settings...\n    - click WebGL\n    - configure your build\n    - click Build and choose this repo as the destination\n  - Here:\n    - run `. deploy_env.sh`\n    - run `deploy`\n    - when done, run `deactivate`\n\n`deploy` will:\n  - login to ECR\n  - build the docker image (./Dockerfile)\n  - push the image to ECR\n  - create a new task definition revision\n  - update the service with the new task definiton\n\nWhile in the deploy environment, you can:\n  - `ecr-login`: login to ECR\n  - `build`: build the local docker image\n  - `push`: push image (takes name from `config.json`.name) to ECR\n  - `revise`: create new task definition revision\n  - `update`: update the service with the new task definition\n  - `deactivate`: deactivate deploy environment\n\nThat's the basic flow of things. You can always version control your builds and use this in something like Jenkins.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesalbert%2Fdeploy-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesalbert%2Fdeploy-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesalbert%2Fdeploy-unity/lists"}