https://github.com/bfirsh/docker-cloud-subdomains
Automatic Heroku-style subdomains for Docker Cloud
https://github.com/bfirsh/docker-cloud-subdomains
docker-cloud
Last synced: about 1 year ago
JSON representation
Automatic Heroku-style subdomains for Docker Cloud
- Host: GitHub
- URL: https://github.com/bfirsh/docker-cloud-subdomains
- Owner: bfirsh
- License: apache-2.0
- Created: 2016-05-27T22:44:46.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-01T16:54:10.000Z (over 9 years ago)
- Last Synced: 2025-02-26T12:09:06.735Z (about 1 year ago)
- Topics: docker-cloud
- Language: Python
- Size: 16.6 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-cloud-subdomains
A Docker Cloud app which automatically makes other apps in your Docker Cloud account accessible as Heroku-style subdomains (e.g. myapp.example.com).
## Getting started
1. Create a stack on Docker Cloud using this stack file, filling in your Docker Cloud details and setting `DOCKERCLOUD_SUBDOMAINS_DOMAIN` to the domain name you want subdomains to appear on:
traefik:
image: traefik
command: --web
ports:
- "80:80"
updater:
image: bfirsh/docker-cloud-subdomains
environment:
- "DOCKERCLOUD_SUBDOMAINS_DOMAIN=example.com"
- "DOCKERCLOUD_USER"
- "DOCKERCLOUD_APIKEY"
links:
- traefik
2. Get the address of the traefik service that you have just created in Docker Cloud (something ending with `.svc.dockerapp.io`). Set up a wildcard CNAME on the domain you want to use and point it at the service address.
3. You can now set the label `sh.fir.subdomains.subdomain` and `sh.fir.subdomains.port` on containers in your Docker Cloud apps to to expose ports under a particular subdomain. For example, you might put something like this in your stack file to make port 80 available at `myapp.example.com`:
web:
image: oscorp/myapp
labels:
- "sh.fir.subdomains.subdomain=myapp"
- "sh.fir.subdomains.port=80"