{"id":16222188,"url":"https://github.com/hugodf/docker-compose-local-https","last_synced_at":"2025-08-13T18:23:10.002Z","repository":{"id":85773944,"uuid":"174237697","full_name":"HugoDF/docker-compose-local-https","owner":"HugoDF","description":"Examples of local HTTPS with docker-compose + mkcert + nginx/Caddy","archived":false,"fork":false,"pushed_at":"2020-07-01T17:52:16.000Z","size":7,"stargazers_count":89,"open_issues_count":1,"forks_count":19,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T18:33:56.407Z","etag":null,"topics":["caddy","docker","docker-compose","https","https-proxy","mkcert","nginx","nodejs","tls"],"latest_commit_sha":null,"homepage":"https://codewithhugo.com/docker-compose-local-https/","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/HugoDF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"HugoDF"}},"created_at":"2019-03-06T23:39:42.000Z","updated_at":"2025-01-23T17:09:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"5db8eb7e-4bd2-40fb-b7d6-05d1a53cc3bc","html_url":"https://github.com/HugoDF/docker-compose-local-https","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HugoDF%2Fdocker-compose-local-https","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HugoDF%2Fdocker-compose-local-https/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HugoDF%2Fdocker-compose-local-https/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HugoDF%2Fdocker-compose-local-https/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HugoDF","download_url":"https://codeload.github.com/HugoDF/docker-compose-local-https/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989109,"owners_count":20379648,"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":["caddy","docker","docker-compose","https","https-proxy","mkcert","nginx","nodejs","tls"],"created_at":"2024-10-10T12:11:37.882Z","updated_at":"2025-03-19T11:31:18.298Z","avatar_url":"https://github.com/HugoDF.png","language":"Shell","funding_links":["https://github.com/sponsors/HugoDF"],"categories":[],"sub_categories":[],"readme":"# Docker Compose local HTTPS\n\n\u003e Examples of local HTTPS with docker-compose + mkcert\n\n## Prerequisites\n\n- [mkcert](https://github.com/FiloSottile/mkcert)\n- [Docker Desktop](https://www.docker.com/products/docker-desktop)\n\nRun `mkcert -install`\n\nRun `./init.sh` (creates local certificates using mkcert and copies them to where the Caddy and nginx examples expect them)\n\n## The setup\n\nEach example has a barebones Node app running on the official Node 10 Docker image running on port 8080.\n\nThe Node code is at [./caddy/app/index.js](./caddy/app/index.js), [./caddy-gen/app/index.js](./caddy-gen/app/index.js) and [./nginx/app/index.js](./caddy/app/index.js).\n\nIt also has a reverse-proxy set up using Caddy and nginx respectively which\n\n## Caddy Example with Caddyfile\n\n\u003e Caddy is the HTTP/2 web server with automatic HTTPS.\n\u003e \n\u003e https://caddyserver.com/\n\nSee [./caddy](./caddy), uses [https://github.com/abiosoft/caddy-docker](https://github.com/abiosoft/caddy-docker) Docker image.\n\nTo run it:\n\n```sh\ncd caddy\ndocker-compose up\n```\n\nThen either navigate to https://foo.test or `curl https://foo.test`.\n\n\u003e Note: the nginx/Caddy examples needs to be stopped before starting this Caddy example\n\n## Caddy Example with docker-gen\n\n\u003e Caddy is the HTTP/2 web server with automatic HTTPS.\n\u003e \n\u003e https://caddyserver.com/\n\nThis image leverages [Docker-gen](https://github.com/jwilder/docker-gen) to \"Generate files from docker container meta-data\".\n\nWhich allows us to build the configuration for the reverse proxy using labels on the target container (without a Caddyfile, that's the file generated from the labels).\n\nSee [./caddy-gen](./caddy-gen), uses [https://github.com/wemake-services/caddy-gen](https://github.com/wemake-services/caddy-gen) Docker image.\n\n```sh\ncd caddy-gen\ndocker-compose up\n```\n\nThen either navigate to https://foo.test or `curl https://foo.test`.\n\n\u003e Note: the nginx/other Caddy examples needs to be stopped before starting the Caddy example\n\n\n## nginx Example\n\n\u003e [nginx](https://www.nginx.com/) is a web server which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache.\n\u003e \n\u003e Wikipedia\n\nSee [./nginx](./nginx), uses [https://github.com/jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy) Docker image.\n\nThis image leverages [Docker-gen](https://github.com/jwilder/docker-gen) to \"Generate files from docker container meta-data\".\n\n```sh\ncd nginx\ndocker-compose up\n```\n\nThen either navigate to https://foo.test or `curl https://foo.test`.\n\n\u003e Note: the Caddy examples needs to be stopped before starting the nginx example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugodf%2Fdocker-compose-local-https","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugodf%2Fdocker-compose-local-https","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugodf%2Fdocker-compose-local-https/lists"}