Comments (8)
Unfortunately, there are only two options for this:
- to use a custom nginx.conf.sigil to perform the mapping
- deploy two different apps, each one listening on a different port
That said, what would be the desired interface for this? How would it work for apps that aren't mapped to a particular domain?
from dokku.
All right, thanks for getting back! I´ll try out the custom nginx.conf.sigil again.
I think the optimal interface would be to be able to map it via CLI.
So just as I mapping internal to external ports for an app, you could maybe also map an external facing port of the App to an Domain you have added to the app // directly map the internal port to the domain. If an App´s port is not mapped to a domain and is exposed externally, then its just accessible without the port.
from dokku.
I mean it would be somehow mapped via the cli, but what do those commands look like in your head?
from dokku.
Maybe something like this would be intuitive
dokku ports:add app-name 80:8080 appname.com
Although I dont know if 'ports' is the propper place to do that management, would rather fit into proxy
For the custom nginx.conf.sigil I am running into the following issue:
When trying to: dokku nginx:set /root/softgen.ai/softgen.ai/template/nginx.conf.sigil project-13 .dokku/nginx.conf.sigil
Returns: ! Invalid key specified, valid keys include: access-log-format, access-log-path, bind-address-ipv4, bind-address-ipv6, client-max-body-size, disable-custom-config, error-log-path, hsts, hsts-include-subdomains, hsts-preload, hsts-max-age, nginx-conf-sigil-path, proxy-read-timeout, proxy-buffer-size, proxy-buffering, proxy-buffers, proxy-busy-buffers-size, x-forwarded-for-value, x-forwarded-port-value, x-forwarded-proto-value, x-forwarded-ssl
I always get it back, even if I leave the nginx.conf.sigil exactly as it is in the template tehttps://github.com/dokku/dokku/blob/master/plugins/nginx-vhosts/templates/nginx.conf.sigil – no matter if edited or not I get that error.
from dokku.
The ports:add
command already takes multiple port mappings, so your example wouldn't work.
You can't set the path of an nginx.conf.sigil
file like that. Not sure where you got that command, but if it was ChatGPT, please try our docs site first...
from dokku.
I took the command from the docs directly, ChatGPT would probably have gotten it right – I thought the 'nginx-conf-sigil-path' is a placeholder for the path...
Maybe something in this direction?
-
dokku domains:map
-
dokku domains:map app-name domain.com 80
-
dokku proxy:map
-
dokku proxy:map app-name domain.com 80
Map a mapped external port of an app to a specific domain.
from dokku.
Baring rare exceptions (buildpacks and proxy) the :set
commands take property keys, so those aren't placeholders. In this case, the value would be a value in your repo path.
With a domains map command, what is the port 80 there? Is that a host port or a container port? How do we know which mapping to use, and how does this relate to the scheme?
from dokku.
I'm going to close it. I don't think I'll be implementing this as the port map construct - as well as proxies implementing them - is already complex enough. While I think it would be useful, I think this would require a rethink on how process, ports, and domains all relate to each other.
from dokku.
Related Issues (20)
- End phase of deploy: Unable to rename container HOT 18
- Unable to update from version 0.19.9
- Dokku reports "zero downtime is disabled" when it is in fact enabled HOT 12
- Cannot destroy an old app with a colon in the name HOT 6
- Cron jobs failing with setuidgid: fatal: unable to run --: file does not exis HOT 2
- Worker automatically exit after some time without restarting HOT 2
- Dokku website not reachable from ipv6-only machine HOT 9
- Log tailing with `dokku logs -t [<app>]` failed to display latest log output HOT 10
- --force-tty cannot be used with run:detached HOT 1
- rootless containers HOT 10
- k3s scheduler: ability to add extra labels HOT 3
- Supporting `underscores_in_headers` nginx property
- logrotate of vector-logs permission denied on log sink file HOT 5
- How to Host Express Server With Static Files Served From NGINX? HOT 1
- `cron:set` is not a dokku command HOT 4
- dokku buildpacks:remove my-special-app --index 1 doesn't seem to work HOT 3
- git:from-image does not update the image in /var/lib/dokku/data/git/appName/Dockerfile HOT 9
- Clarify ssh-keys commands to run when adding ssh keys in docker-based installation HOT 1
- Clarify in k3s documentation that a registry is required HOT 4
- `git:sync` fails with “trying to write non-commit object” HOT 5
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 dokku.