{"id":34959862,"url":"https://github.com/mathieu-benoit/nginx-score-demo","last_synced_at":"2026-05-25T05:05:17.326Z","repository":{"id":272340782,"uuid":"916245818","full_name":"mathieu-benoit/nginx-score-demo","owner":"mathieu-benoit","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-10T11:18:37.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-10T12:25:22.965Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathieu-benoit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-01-13T18:18:51.000Z","updated_at":"2025-05-10T11:18:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b375380-4487-4fc3-924a-fa30d8dc0970","html_url":"https://github.com/mathieu-benoit/nginx-score-demo","commit_stats":null,"previous_names":["mathieu-benoit/nginx-score-demo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mathieu-benoit/nginx-score-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieu-benoit%2Fnginx-score-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieu-benoit%2Fnginx-score-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieu-benoit%2Fnginx-score-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieu-benoit%2Fnginx-score-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathieu-benoit","download_url":"https://codeload.github.com/mathieu-benoit/nginx-score-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieu-benoit%2Fnginx-score-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33461099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T02:24:28.008Z","status":"ssl_error","status_checked_at":"2026-05-25T02:23:23.339Z","response_time":57,"last_error":"SSL_read: 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":[],"created_at":"2025-12-26T22:38:11.203Z","updated_at":"2026-05-25T05:05:17.320Z","avatar_url":"https://github.com/mathieu-benoit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-score-demo\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/mathieu-benoit/nginx-score-demo)\n\nA Developer authors and maintains their files in the [`website`](./website/) folder, their [`Dockerfile`](Dockerfile) and the [`score.yaml`](score.yaml) file.\n\nThen, they can deploy their `score.yaml` file with three options:\n- [Deploy with `score-compose`](#deploy-with-score-compose)\n- [Deploy with `score-k8s`](#deploy-with-score-k8s)\n- [Deploy with `humctl`](#deploy-with-humctl)\n\n## Deploy with `score-compose`\n\nInitialize the local `score-compose` workspace:\n```bash\nscore-compose init \\\n    --no-sample \\\n    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/horizontal-pod-autoscaler/score-compose/10-hpa.provisioners.yaml \\\n    --patch-templates https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-compose/unprivileged.tpl\n```\n\nGenerate the Docker Compose files:\n```bash\nscore-compose generate score.yaml \\\n    --build 'webapp={\"context\":\".\"}'\n```\n\nDeploy the Docker Compose files:\n```bash\ndocker compose up --build -d --remove-orphans\n```\n\nTest the deployed Workload:\n```bash\ncurl $(score-compose resources get-outputs dns.default#nginx.dns --format '{{ .host }}:8080')\n```\n\n## Deploy with `score-k8s`\n\nPrepare the cluster:\n```bash\n./scripts/setup-kind-cluster.sh\n\nCONTAINER_IMAGE=nginx-score-demo-nginx-webapp:latest\nkind load docker-image ${CONTAINER_IMAGE}\n\nNAMESPACE=default\nkubectl create ns $NAMESPACE\nkubectl label ns $NAMESPACE pod-security.kubernetes.io/enforce=restricted\n```\n\nInitialize the local `score-k8s` workspace:\n```bash\nscore-k8s init \\\n    --no-sample \\\n    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/horizontal-pod-autoscaler/score-k8s/10-hpa.provisioners.yaml \\\n    --patch-templates https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-k8s/service-account.tpl \\\n    --patch-templates https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-k8s/unprivileged.tpl\n```\n\nGenerate the Kubernetes manifests:\n```bash\nscore-k8s generate score.yaml \\\n    --image ${CONTAINER_IMAGE}\n```\n\nDeploy the Kubernetes manifests:\n```bash\nkubectl apply -n $NAMESPACE -f manifests.yaml\n```\n\nTest the deployed Workload:\n```bash\ncurl $(score-k8s resources get-outputs dns.default#nginx.dns --format '{{ .host }}')\n```\n\n## Deploy with `humctl`\n\nDeploy the Score file in Humanitec:\n```bash\nCONTAINER_IMAGE_IN_REGISTRY=FIXME\n\nhumctl score deploy -f score.yaml \\\n    --app ${APP} \\\n    --env ${ENV} \\\n    --image ${CONTAINER_IMAGE_IN_REGISTRY}\n```\n\n_Note: this is assuming that Platform Engineers have registered the following [`volume`](https://developer.humanitec.com/examples/resource-definitions?capability=volumes), [`horizontal-pod-autoscaler`](https://developer.humanitec.com/examples/resource-definitions?capability=horizontal-pod-autoscaler) and [`workload` with `securityContext`](https://developer.humanitec.com/examples/resource-definitions/template-driver/security-context/) in Humanitec._\n\nTest the deployed Workload:\n```bash\nhumctl get active-resources \\\n    --app ${APP} \\\n    --env ${ENV} \\\n    -o json \\\n    | jq -r '. | map(. | select(.metadata.type == \"dns\")) | map((.metadata.res_id | split(\".\") | .[1]) + \": [\" + .status.resource.host + \"](https://\" + .status.resource.host + \")\") | join(\"\\n\")'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieu-benoit%2Fnginx-score-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathieu-benoit%2Fnginx-score-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieu-benoit%2Fnginx-score-demo/lists"}