{"id":19175818,"url":"https://github.com/handcraftedbits/docker-nginx-unit-static","last_synced_at":"2026-06-20T11:31:51.517Z","repository":{"id":95812343,"uuid":"63911085","full_name":"handcraftedbits/docker-nginx-unit-static","owner":"handcraftedbits","description":"A Docker container that provides a static content unit for NGINX Host","archived":false,"fork":false,"pushed_at":"2017-02-17T03:13:22.000Z","size":8,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-13T04:00:30.164Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/handcraftedbits.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":"2016-07-22T00:29:43.000Z","updated_at":"2016-07-22T00:30:46.000Z","dependencies_parsed_at":"2023-04-30T11:46:54.634Z","dependency_job_id":null,"html_url":"https://github.com/handcraftedbits/docker-nginx-unit-static","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/handcraftedbits/docker-nginx-unit-static","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/handcraftedbits%2Fdocker-nginx-unit-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/handcraftedbits%2Fdocker-nginx-unit-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/handcraftedbits%2Fdocker-nginx-unit-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/handcraftedbits%2Fdocker-nginx-unit-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/handcraftedbits","download_url":"https://codeload.github.com/handcraftedbits/docker-nginx-unit-static/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/handcraftedbits%2Fdocker-nginx-unit-static/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34568741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-09T10:25:28.665Z","updated_at":"2026-06-20T11:31:51.502Z","avatar_url":"https://github.com/handcraftedbits.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGINX Host Static Content Unit [![Docker Pulls](https://img.shields.io/docker/pulls/handcraftedbits/nginx-unit-static.svg?maxAge=2592000)](https://hub.docker.com/r/handcraftedbits/nginx-unit-static)\n\nA [Docker](https://www.docker.com) container that provides a static content unit for\n[NGINX Host](https://github.com/handcraftedbits/docker-nginx-host).\n\n# Usage\n\n## Configuration\n\nIt is highly recommended that you use container orchestration software such as\n[Docker Compose](https://www.docker.com/products/docker-compose) when using this NGINX Host unit as several Docker\ncontainers are required for operation.  This guide will assume that you are using Docker Compose.\n\nTo begin, start with a basic `docker-compose.yml` file as described in the\n[NGINX Host configuration guide](https://github.com/handcraftedbits/docker-nginx-host#configuration).  Then, add a\nservice for the NGINX Host static content unit (named `static`):\n\n```yaml\nstatic:\n  image: handcraftedbits/nginx-unit-static\n  environment:\n    - NGINX_UNIT_HOSTS=mysite.com\n    - NGINX_URL_PREFIX=/static\n  volumes:\n    - data:/opt/container/shared\n    - /home/me/www-static:/opt/container/www-static\n```\n\nObserve the following:\n\n* We mount `/opt/container/www-static` using the local directory `/home/me/www-static`.  This is the directory\n  containing the static content that we will be hosting.\n* As with any other NGINX Host unit, we mount our data volume, in this case named `data`, to `/opt/container/shared`.\n\nFinally, we need to create a link in our NGINX Host container to the `static` container in order to host the static\ncontent.  Here is our final `docker-compose.yml` file:\n\n```yaml\nversion: \"2.1\"\n\nvolumes:\n  data:\n\nservices:\n  proxy:\n    image: handcraftedbits/nginx-host\n    links:\n      - static\n    ports:\n      - \"443:443\"\n    volumes:\n      - data:/opt/container/shared\n      - /etc/letsencrypt:/etc/letsencrypt\n      - /home/me/dhparam.pem:/etc/ssl/dhparam.pem\n\n  static:\n    image: handcraftedbits/nginx-unit-static\n    environment:\n      - NGINX_UNIT_HOSTS=mysite.com\n      - NGINX_URL_PREFIX=/static\n    volumes:\n      - data:/opt/container/shared\n      - /home/me/www-static:/opt/container/www-static\n```\n\nThis will result in making the static content available at `https://mysite.com/static`.\n\n## Running the NGINX Host Static Content Unit\n\nAssuming you are using Docker Compose, simply run `docker-compose up` in the same directory as your\n`docker-compose.yml` file.  Otherwise, you will need to start each container with `docker run` or a suitable\nalternative, making sure to add the appropriate environment variables and volume references.\n\n# Reference\n\n## Environment Variables\n\nPlease see the NGINX Host [documentation](https://github.com/handcraftedbits/docker-nginx-host#units) for information\non the environment variables understood by this unit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhandcraftedbits%2Fdocker-nginx-unit-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhandcraftedbits%2Fdocker-nginx-unit-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhandcraftedbits%2Fdocker-nginx-unit-static/lists"}