Previously, if a domain used the format app.subdomain.domain.tld, entrypoint.sh would fail to rename the docker images correctly.
A domain like this:
app.subdomain.domain.tld
will be named
subdomain-domain-tld
creating a duplicate container name error if attempting to host multiple services using that gateway.
This adds a higher string slice [-3:] -> [-4:] which now correctly names app level domains as app-subdomain-domain-tld.
It also adds the app name to the nginx.conf.template, which will correctly parse app-subdomain-domain-tld.
I ran into this issue with a duckdns domain, which looks like the following: app.mydomain.duckdns.org, making all my containers named mydomain-duckdns-org, causing duplicate container issues.
Previously, if a domain used the format app.subdomain.domain.tld, entrypoint.sh would fail to rename the docker images correctly. A domain like this: app.subdomain.domain.tld
will be named subdomain-domain-tld
creating a duplicate container name error if attempting to host multiple services using that gateway.
This adds a higher string slice [-3:] -> [-4:] which now correctly names app level domains as app-subdomain-domain-tld. It also adds the app name to the nginx.conf.template, which will correctly parse app-subdomain-domain-tld.
I ran into this issue with a duckdns domain, which looks like the following: app.mydomain.duckdns.org, making all my containers named mydomain-duckdns-org, causing duplicate container issues.