{"id":15789496,"url":"https://github.com/jeffdecola/hello-go-deploy-amazon-ec2","last_synced_at":"2026-05-05T14:33:35.264Z","repository":{"id":56258038,"uuid":"174427767","full_name":"JeffDeCola/hello-go-deploy-amazon-ec2","owner":"JeffDeCola","description":"Test, build, push (to DockerHub) and deploy a long running \"hello-world\" Docker Image to Amazon Elastic Compute Cloud (ec2).","archived":false,"fork":false,"pushed_at":"2025-04-20T18:57:28.000Z","size":1218,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T18:45:27.398Z","etag":null,"topics":["amazon","amazon-ec2","amazon-web-services","aws","concourse","docker","dockerhub","dockerimage","ec2","go","golang"],"latest_commit_sha":null,"homepage":"","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/JeffDeCola.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":"2019-03-07T22:10:22.000Z","updated_at":"2025-04-20T18:57:32.000Z","dependencies_parsed_at":"2024-10-26T03:25:35.952Z","dependency_job_id":"7b20d2e8-f44a-412c-a2bc-d98de01d1b54","html_url":"https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JeffDeCola/hello-go-deploy-amazon-ec2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffDeCola%2Fhello-go-deploy-amazon-ec2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffDeCola%2Fhello-go-deploy-amazon-ec2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffDeCola%2Fhello-go-deploy-amazon-ec2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffDeCola%2Fhello-go-deploy-amazon-ec2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeffDeCola","download_url":"https://codeload.github.com/JeffDeCola/hello-go-deploy-amazon-ec2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffDeCola%2Fhello-go-deploy-amazon-ec2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32653584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","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":["amazon","amazon-ec2","amazon-web-services","aws","concourse","docker","dockerhub","dockerimage","ec2","go","golang"],"created_at":"2024-10-04T22:01:51.435Z","updated_at":"2026-05-05T14:33:35.244Z","avatar_url":"https://github.com/JeffDeCola.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HELLO GO DEPLOY AMAZON EC2\n\n[![Tag Latest](https://img.shields.io/github/v/tag/jeffdecola/hello-go-deploy-amazon-ec2)](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2/tags)\n[![jeffdecola.com](https://img.shields.io/badge/website-jeffdecola.com-blue)](https://jeffdecola.com)\n[![MIT License](https://img.shields.io/:license-mit-blue.svg)](https://jeffdecola.mit-license.org)\n[![Go Reference](https://pkg.go.dev/badge/github.com/JeffDeCola/hello-go-deploy-amazon-ec2.svg)](https://pkg.go.dev/github.com/JeffDeCola/hello-go-deploy-amazon-ec2)\n[![Go Report Card](https://goreportcard.com/badge/github.com/JeffDeCola/hello-go-deploy-amazon-ec2)](https://goreportcard.com/report/github.com/JeffDeCola/hello-go-deploy-amazon-ec2)\n[![Docker Pulls](https://badgen.net/docker/pulls/jeffdecola/hello-go-deploy-amazon-ec2?icon=docker\u0026label=pulls)](https://hub.docker.com/r/jeffdecola/hello-go-deploy-amazon-ec2/)\n\n```text\n*** THE DEPLOY IS UNDER CONSTRUCTION - CHECK BACK SOON ***\n```\n\n_Deploy a \"hello-world\" docker image to\nAmazon Elastic Compute Cloud (ec2)._\n\nOther Services\n\n* PaaS\n  * [hello-go-deploy-aws-elastic-beanstalk](https://github.com/JeffDeCola/hello-go-deploy-aws-elastic-beanstalk)\n  * [hello-go-deploy-azure-app-service](https://github.com/JeffDeCola/hello-go-deploy-azure-app-service)\n  * [hello-go-deploy-gae](https://github.com/JeffDeCola/hello-go-deploy-gae)\n  * [hello-go-deploy-marathon](https://github.com/JeffDeCola/hello-go-deploy-marathon)\n* CaaS\n  * [hello-go-deploy-amazon-ecs](https://github.com/JeffDeCola/hello-go-deploy-amazon-ecs)\n  * [hello-go-deploy-amazon-eks](https://github.com/JeffDeCola/hello-go-deploy-amazon-eks)\n  * [hello-go-deploy-aks](https://github.com/JeffDeCola/hello-go-deploy-aks)\n  * [hello-go-deploy-gke](https://github.com/JeffDeCola/hello-go-deploy-gke)\n* IaaS\n  * [hello-go-deploy-amazon-ec2](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2)\n    **(You are here)**\n  * [hello-go-deploy-azure-vm](https://github.com/JeffDeCola/hello-go-deploy-azure-vm)\n  * [hello-go-deploy-gce](https://github.com/JeffDeCola/hello-go-deploy-gce)\n\nTable of Contents\n\n* [OVERVIEW](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2#overview)\n* [PREREQUISITES](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2#prerequisites)\n* [SOFTWARE STACK](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2#software-stack)\n* [RUN](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2#run)\n* [STEP 1 - TEST](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2#step-1---test)\n* [STEP 2 - BUILD (DOCKER IMAGE VIA DOCKERFILE)](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2#step-2---build-docker-image-via-dockerfile)\n* [STEP 3 - PUSH (TO DOCKERHUB)](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2#step-3---push-to-dockerhub)\n* [STEP 4 - DEPLOY (TO EC2)](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2#step-4---deploy-to-ec2)\n* [CONTINUOUS INTEGRATION \u0026 DEPLOYMENT](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2#continuous-integration--deployment)\n\nDocumentation and Reference\n\n* The\n  [hello-go-deploy-amazon-ec2 docker image](https://hub.docker.com/r/jeffdecola/hello-go-deploy-amazon-ec2)\n  on DockerHub\n* This repos\n  [github webpage](https://jeffdecola.github.io/hello-go-deploy-amazon-ec2/)\n  _built with\n  [concourse](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2/blob/master/ci-README.md)_\n\n## OVERVIEW\n\nEvery 2 seconds this App will print,\n\n```txt\n    INFO[0000] Let's Start this!\n    Hello everyone, count is: 1\n    Hello everyone, count is: 2\n    Hello everyone, count is: 3\n    etc...\n```\n\n## PREREQUISITES\n\nYou will need the following go packages,\n\n```bash\ngo get -u -v github.com/sirupsen/logrus\ngo get -u -v github.com/cweill/gotests/...\n```\n\n## SOFTWARE STACK\n\n* DEVELOPMENT\n  * [go](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/languages/go-cheat-sheet)\n* OPERATIONS\n  * [concourse/fly](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/operations/continuous-integration-continuous-deployment/concourse-cheat-sheet)\n    (optional)\n  * [docker](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/operations/orchestration/builds-deployment-containers/docker-cheat-sheet)\n* SERVICES\n  * [dockerhub](https://hub.docker.com/)\n  * amazon elastic compute cloud (ec2)\n\n## RUN\n\nTo\n[run.sh](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2/blob/master/hello-go-deploy-amazon-ec2-code/run.sh),\n\n```bash\ncd hello-go-deploy-amazon-ec2-code\ngo run main.go\n```\n\nTo\n[create-binary.sh](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2/blob/master/hello-go-deploy-amazon-ec2-code/bin/create-binary.sh),\n\n```bash\ncd hello-go-deploy-amazon-ec2-code/bin\ngo build -o hello-go ../main.go\n./hello-go\n```\n\nThis binary will not be used during a docker build\nsince it creates it's own.\n\n## STEP 1 - TEST\n\nTo create unit `_test` files,\n\n```bash\ncd hello-go-deploy-amazon-ec2-code\ngotests -w -all main.go\n```\n\nTo run\n[unit-tests.sh](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2/tree/master/hello-go-deploy-amazon-ec2-code/test/unit-tests.sh),\n\n```bash\ngo test -cover ./... | tee test/test_coverage.txt\ncat test/test_coverage.txt\n```\n\n## STEP 2 - BUILD (DOCKER IMAGE VIA DOCKERFILE)\n\nThis docker image is built in two stages.\nIn **stage 1**, rather than copy a binary into a docker image (because\nthat can cause issues), the Dockerfile will build the binary in the\ndocker image.\nIn **stage 2**, the Dockerfile will copy this binary\nand place it into a smaller docker image based\non `alpine`, which is around 13MB.\n\nTo\n[build.sh](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2/blob/master/hello-go-deploy-amazon-ec2-code/build/build.sh)\nwith a\n[Dockerfile](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2/blob/master/hello-go-deploy-amazon-ec2-code/build/Dockerfile),\n\n```bash\ncd hello-go-deploy-amazon-ec2-code/build\ndocker build -f Dockerfile -t jeffdecola/hello-go-deploy-amazon-ec2 .\n```\n\nYou can check and test this docker image,\n\n```bash\ndocker images jeffdecola/hello-go-deploy-amazon-ec2\ndocker run --name hello-go-deploy-amazon-ec2 -dit jeffdecola/hello-go-deploy-amazon-ec2\ndocker exec -i -t hello-go-deploy-amazon-ec2 /bin/bash\ndocker logs hello-go-deploy-amazon-ec2\ndocker rm -f hello-go-deploy-amazon-ec2\n```\n\n## STEP 3 - PUSH (TO DOCKERHUB)\n\nYou must be logged in to DockerHub,\n\n```bash\ndocker login\n```\n\nTo\n[push.sh](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2/blob/master/hello-go-deploy-amazon-ec2-code/push/push.sh),\n\n```bash\ndocker push jeffdecola/hello-go-deploy-amazon-ec2\n```\n\nCheck the\n[hello-go-deploy-amazon-ec2 docker image](https://hub.docker.com/r/jeffdecola/hello-go-deploy-amazon-ec2)\nat DockerHub.\n\n## STEP 4 - DEPLOY (TO EC2)\n\n_Coming soon._\n\n## CONTINUOUS INTEGRATION \u0026 DEPLOYMENT\n\nRefer to\n[ci-README.md](https://github.com/JeffDeCola/hello-go-deploy-amazon-ec2/blob/master/ci-README.md)\non how I automated the above steps using concourse.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffdecola%2Fhello-go-deploy-amazon-ec2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffdecola%2Fhello-go-deploy-amazon-ec2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffdecola%2Fhello-go-deploy-amazon-ec2/lists"}