{"id":21101245,"url":"https://github.com/create1st/docker-localstack","last_synced_at":"2025-05-16T18:34:24.733Z","repository":{"id":37060172,"uuid":"348252347","full_name":"create1st/docker-localstack","owner":"create1st","description":"AWS + Docker + localstack + Buildkite + Spring Boot + Terraform + ReactJS","archived":false,"fork":false,"pushed_at":"2023-03-01T22:58:57.000Z","size":796,"stargazers_count":2,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-02T14:36:16.876Z","etag":null,"topics":["aws","aws-dynamodb","aws-kms","aws-secretsmanager","aws-sns","aws-sqs","buildkite","docker","docker-localstack","k8s","kotlin","kubernetes","localstack","material-ui","nginx","project-reactor","react","spring-boot","terraform","typescript"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/create1st.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}},"created_at":"2021-03-16T07:27:59.000Z","updated_at":"2023-03-02T14:36:16.876Z","dependencies_parsed_at":"2022-07-22T05:02:27.572Z","dependency_job_id":null,"html_url":"https://github.com/create1st/docker-localstack","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/create1st%2Fdocker-localstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/create1st%2Fdocker-localstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/create1st%2Fdocker-localstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/create1st%2Fdocker-localstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/create1st","download_url":"https://codeload.github.com/create1st/docker-localstack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225444759,"owners_count":17475353,"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":["aws","aws-dynamodb","aws-kms","aws-secretsmanager","aws-sns","aws-sqs","buildkite","docker","docker-localstack","k8s","kotlin","kubernetes","localstack","material-ui","nginx","project-reactor","react","spring-boot","terraform","typescript"],"created_at":"2024-11-19T23:43:44.469Z","updated_at":"2024-11-19T23:43:45.216Z","avatar_url":"https://github.com/create1st.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e    \n \u003cimg src=\"https://img.shields.io/github/license/create1st/docker-localstack.svg\" align=\"left\" /\u003e\n \u003cimg src=\"https://img.shields.io/badge/Docker-blue.svg\" align=\"left\" /\u003e\n \u003cimg src=\"https://img.shields.io/badge/localstack-orange.svg\" align=\"left\" /\u003e\n \u003cimg src=\"https://img.shields.io/badge/Terraform-blueviolet.svg\" align=\"left\" /\u003e\n \u003cimg src=\"https://img.shields.io/badge/Buildkite-green.svg\" align=\"left\" /\u003e\n \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-green.svg\" align=\"left\" /\u003e\n\u003c/div\u003e\n\n# docker-localstack\n\nDocker + localstack + Buildkite\n\n```shell\ndocker network create docker-localstack-network\ndocker-compose -f docker-compose-localstack.yaml up\n\neval `ssh-agent`\nexport TF_CLI_ARGS_apply=\"-no-color\"\nexport TF_CLI_ARGS_plan=\"-no-color\"\nbk run -E SSH_AUTH_SOCK=\"$SSH_AUTH_SOCK\"\nbk run .buildkite/pipeline-aws-ops.yaml\nbk run .buildkite/pipeline-k8s-ops.yaml\nbk run .buildkite/pipeline-aws-ops-development.yaml\nbuildkite-agent start --spawn 5 --tags \"queue=global,queue=infra,queue=dev-aws-ops,queue=dev-k8s-ops,queue=app\"\n```\n\n```shell\ncd app\ndocker-compose -f docker-compose-integration-tests.yml build \ndocker-compose -f docker-compose-integration-tests.yml up localstack-setup postgresql\ndocker-compose -f docker-compose-integration-tests.yml run integration-test\n```\n\n```shell\ncd app\ndocker-compose -f docker-compose-acceptance-tests.yml build \ndocker-compose -f docker-compose-acceptance-tests.yml up localstack-setup postgresql\ndocker-compose -f docker-compose-acceptance-tests.yml run acceptance-test\n```\n\n```shell\nbk run app/.buildkite/pipeline.yaml\nbk run webapp/.buildkite/pipeline.yaml\n```\n\n# IntelliJ\n\n```shell\ncd app\ndocker-compose -f docker-compose-local.yml build\ndocker-compose -f docker-compose-local.yml up\n```\n\n# Run Web application\n\n```shell\ndocker run -p 80:8080 docker-localstack-webapp:latest\n```\n\n# K8s\n\n```shell\ndocker-comdocker -f .buildkite/image/docker-compose.yml build k8s-ci-cd\nbk run .buildkite/pipeline-k8s-ci-di-image.yaml\n```\n\n# Build\n\nJIB app\n\n```shell\ncd app\ngradle clean build test jib -x integrationTest -x acceptanceTest\ndocker image rm craftandtechnology/docker-localstack:latest\n#docker pull craftandtechnology/docker-localstack:latest\ndocker-compose up\ndocker-compose rm -f\ndocker image rm craftandtechnology/docker-localstack:latest\n```\n\nwebapp\n\n```shell\ncd webapp\ndocker-compose build\n```\n\nhttps-proxy sidecar\n\n```shell\ncd https-proxy\nmkdir -p \"$(pwd)/nginx/etc/ssl/private\"\nmkdir -p \"$(pwd)/nginx/etc/ssl/certs\"\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout \"$(pwd)/nginx/etc/ssl/private/nginx-selfsigned.key\" -out \"$(pwd)/nginx/etc/ssl/certs/nginx-selfsigned.crt\"\nopenssl dhparam -out /etc/ssl/certs/dhparam.pem 2048\ndocker-compose build\ndocker push craftandtechnology/https-proxy:latest\n```\n\n# Minikube\n\nlocalstack\n\n```shell\nminikube start\nkubect create -f localstack.pod.k8s.yaml\nkubect create -f localstack.service.k8s.yaml\nkubectl port-forward $(kubectl get pods | grep \"^localstack\" | awk {'print $1}') 4566:4566\nlocalstack.init.k8s.sh\n```\n\npostgres\n\n```shell\nkubect create -f postgres.configmap.k8s.yaml\nkubect create -f postgres.pv.k8s.yaml\nkubect create -f postgres.pod.k8s.yaml\nkubect create -f postgres.service.k8s.yaml\n```\n\napp\n\n```shell\nkubect create -f app.pod.k8s.yaml\nkubect create -f app.service.k8s.yaml\n# Port forwarding to check service\nkubectl port-forward $(kubectl get pods | grep \"docker-localstack\" | grep -v \"webapp\" | awk {'print $1}') 8080:8080\n# Check logs\nkubectl logs -f -l app=docker-localstack -c docker-localstack\n```\n\nwebapp\n\n```shell\ndocker push craftandtechnology/docker-localstack-webapp:latest\nkubect create -f webapp.pod.k8s.yaml\nkubectl create -f webapp.service.k8s.yaml\n# Port forwarding to check service\nkubectl port-forward $(kubectl get pods | grep \"docker-localstack-webapp\" | awk {'print $1}') 8080:8080\n# Check logs\nkubectl logs -f -l app=docker-localstack-webapp -c docker-localstack-webapp\n# Create tunnel for load balancer\nminikube tunnel\n```\n\nwebapp/web-ui/.env\n```.env\nREACT_APP_AUTH0_DOMAIN=\nREACT_APP_AUTH0_CLIENT_ID=\nREACT_APP_AUTH0_AUDIENCE=\nREACT_APP_AUTH0_SCOPE=read:orders\nREACT_APP_REST_ENDPOINT=http://localhost:8080\n```\n\n# Running\n\nSelf-signed certificate\n=\u003e https://stackoverflow.com/questions/35274659/when-you-use-badidea-or-thisisunsafe-to-bypass-a-chrome-certificate-hsts-err\n\n```shell\ncurl --insecure https://localhost:8443/rest/orders\n```\n\n### Buildkite\n\n* https://github.com/chronotc/monorepo-diff-buildkite-plugin\n* https://github.com/buildkite-plugins/docker-compose-buildkite-plugin\n* https://github.com/buildkite-plugins/artifacts-buildkite-plugin\n* https://github.com/cultureamp/aws-assume-role-buildkite-plugin\n* https://github.com/buildkite-plugins/ecr-buildkite-plugin\n* https://github.com/coyainsurance/s3-cache-buildkite-plugin/tags\n* https://github.com/thedyrt/change-directory-buildkite-plugin\n* https://github.com/buildkite-plugins/shellcheck-buildkite-plugin\n\n### Docker\n\n```shell\nexport DOCKER_BUILDKIT=0\nexport COMPOSE_DOCKER_CLI_BUILD=0\n```\n\n# AWS\n\nRotate password\nhttps://docs.aws.amazon.com/secretsmanager/latest/userguide/tutorials_db-rotate.html\n\n# ENV\n```shell\nSPRING_PROFILES_ACTIVE=local,acceptance-test-local\nJAVA_TOOL_OPTIONS=-Ddrivers.vpcEndpointRegion=us-east-1 -Ddrivers.vpcEndpointUrl=http://localstack:4566\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreate1st%2Fdocker-localstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreate1st%2Fdocker-localstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreate1st%2Fdocker-localstack/lists"}