Comments (4)
Solution might be to assign internal domain for docker hosts and point your example.com as CNAME.
In most cases 'ROOT_DOMAIN' used with 'SRV records'. As your swarm instance able to have multiple hosts inside, subdomain represents those hosts for service discovery.
Example:
_service._proto.name. TTL class SRV priority weight port target.
_sip._tcp.example.com. 86400 IN SRV 10 60 5060 bigbox.example.com.
_sip._tcp.example.com. 86400 IN SRV 10 20 5060 smallbox1.example.com.
_sip._tcp.example.com. 86400 IN SRV 10 20 5060 smallbox2.example.com.
_sip._tcp.example.com. 86400 IN SRV 20 0 5060 backupbox.example.com.
It's used to describe WHAT service and WHERE to deploy.
https://en.wikipedia.org/wiki/SRV_record
from swarmlet.
@ss-o Is CNAME really the expected solution? Wouldn't that be a security risk?
On digitial ocean, I added a CNAME for
www.example.com is an alias of static.example.com
That didn't work
from swarmlet.
I assume I miss understood. Probably you want to deploy app lika a nginx proxy manager to reverse proxy. Have you tried? If no I can refer for more detail. Reverse proxy in my opinion is most secure and easiest way to manage domains/ips/ports if setup correctly.
from swarmlet.
@ss-o Thanks for responding. I don't know much about devops but what I am trying to do is have multiple websites on my VPS where each site can be of the following structure
https:\\www.example.com or https:\\example.com # home page
https:\\www.example.com\app # this is where my app will exist
https:\\blog.example.com # for my blog
I understand each of these (home / app / blog) have to be its own app and deployed separately using traefik but I am having trouble getting the rules to work. For e.g. I have in my docker-compose.yml
- 'traefik.http.routers.frontend.rule=Host(`${DOMAIN}`) || Host(`www.${DOMAIN}`)'
but this accepts www.example.com but not example.com.
PS : I am playing with the https://github.com/swarmlet/swarmlet/blob/master/examples/static-site/docker-compose.yml#L17. I know there is an accompanying nginx.conf file but how will that work with the fact that the domain can be configured in the .env file and fed into the docker-compose.yml for the frontend rule
from swarmlet.
Related Issues (20)
- Python-pip does not exist in Ubuntu 20.04 HOT 2
- Use a different docker-compose.yml HOT 1
- Swarmlet not working with Git LFS HOT 6
- Traefik domain is wrong
- Update Traefik
- Swarm installer can only run as root HOT 2
- Packages / docker not being installed HOT 4
- swarmlet join manager failed
- Install failure at registry connect: Client.Timeout exceeded while awaiting headers
- Hardcoded debian backport mirror can slow or break apt
- INSTALLLATION TYPE with 3 L typo
- Github CI recommandations errors
- Homepage is not loading HOT 1
- Installation on debian issues - deps and swarm init HOT 5
- Traefik cannot complete Letsencrypt validation if host has AAAA (IPv6) DNS records
- Install script fails as it depends on whiptail package
- Install - ansible task fails when running "Add the git user"
- Broken install on Ubuntu 18.04, docker-compose install through Ansible HOT 3
- Installation fails on raspberry PI HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swarmlet.