{"id":15314567,"url":"https://github.com/barelyhuman/docker-caddy-example","last_synced_at":"2026-02-17T08:32:55.353Z","repository":{"id":221055930,"uuid":"752953041","full_name":"barelyhuman/docker-caddy-example","owner":"barelyhuman","description":"container applications with Caddy + docker compose","archived":false,"fork":false,"pushed_at":"2024-10-01T10:14:04.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T02:12:55.076Z","etag":null,"topics":["caddy","container","docker","self-contained","shared"],"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/barelyhuman.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}},"created_at":"2024-02-05T07:13:38.000Z","updated_at":"2024-10-01T10:14:07.000Z","dependencies_parsed_at":"2024-02-05T23:49:17.525Z","dependency_job_id":"ec15f2fb-de4a-4f27-9b72-1cdc80897530","html_url":"https://github.com/barelyhuman/docker-caddy-example","commit_stats":null,"previous_names":["barelyhuman/docker-caddy-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fdocker-caddy-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fdocker-caddy-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fdocker-caddy-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fdocker-caddy-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barelyhuman","download_url":"https://codeload.github.com/barelyhuman/docker-caddy-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991558,"owners_count":21194894,"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","container","docker","self-contained","shared"],"created_at":"2024-10-01T08:46:05.150Z","updated_at":"2025-10-15T20:21:43.957Z","avatar_url":"https://github.com/barelyhuman.png","language":"Shell","readme":"# docker caddy simple\n\nSimple self hosting setups to be able to provision services and map domains to them in an easier fashion.\n\nIf you prefer traefik over caddy, you can go through [this template](https://github.com/barelyhuman/easy-deploy-template) instead\n\n## Why\n\nThere's numerous ways to self host and I keep trying ways to make sure I can manage the server and apps even if I pick them up months later. This is one of many such setups that work well but aren't openly shared across.\n\n## Usage\n\n### Setup network\n\n```sh\n; docker network create caddy_network # create a shareable network\n```\n\nWe create a docker shared network for all the services to talk to each other on. This allows us to configure the `Caddyfile` in a way that allows using service names with unpublished ports without worrying about filling up the ports on the system.\n\n### Add in the needed services\n\n```yaml\n// docker-compose.example-service.yml\nservices:\n    //... existing\n    example_app:\n        image: hello-world:latest\n    networks:\n        caddy_network:\n\nnetworks:\n    caddy_network:\n        external: true\n\n```\n\nThe important part here is to add in the `networks` definition both on the service and the global context of this docker file. Marking it as `external` lets docker compose know that it doesn't have to create another network for this service and to use an existing network.\n\n### Actions\n\nYou can now start the services, make sure to edit the `Makefile` to include your newly added docker-compose file\n\n```sh\n;make start\n;make stop\n;make restart\n;make reset\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fdocker-caddy-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarelyhuman%2Fdocker-caddy-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fdocker-caddy-example/lists"}