docs: Improve documentation around port handling.
While there are a number of enhancements we could do to make port handling more seamless, this is a first step towards documenting the various oddities around port management for Docker vs Buildpack deploys. Refs #2903 Closes #2970 [ci skip]
This commit is contained in:
@@ -13,15 +13,7 @@ To use a dockerfile for deployment, commit a valid `Dockerfile` to the root of y
|
||||
|
||||
## Exposed ports
|
||||
|
||||
> Changed as of 0.5.0
|
||||
|
||||
Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port per line) and setup nginx to proxy the same port numbers to listen publicly. If you would like to change the exposed port, you should do so within your `Dockerfile` and app.
|
||||
|
||||
> Note: If ports are specified via `EXPOSE` in your `Dockerfile`, we will proxy requests to the first port specified. Your application must be configured to listen on that port.
|
||||
|
||||
If you do not explicitly `EXPOSE` a port in your `Dockerfile`, Dokku will configure the nginx proxy to listen on port 80 (and 443 for TLS) and forward traffic to your app listening on port 5000 inside the container. Just like buildpack apps, you can also use the `$PORT` environment variable in your app to maintain portability.
|
||||
|
||||
When ports are exposed through the default nginx proxy, they are proxied externally as HTTP ports. At this time, in no case do we proxy plain TCP or UDP ports. Nginx does not support proxying UDP. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/advanced-usage/proxy-management.md).
|
||||
See the [port management documentation](/docs/advanced-usage/port-management.md).
|
||||
|
||||
## Build-time Configuration Variables
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ The Dokku tags plugin allows you to add docker image tags to the currently deplo
|
||||
|
||||
## Usage
|
||||
|
||||
### Exposed ports
|
||||
|
||||
See the [port management documentation](/docs/advanced-usage/port-management.md).
|
||||
|
||||
### Listing tags for an application
|
||||
|
||||
For example, you can list all tags for a given application:
|
||||
@@ -124,9 +128,6 @@ You can alternatively add image pulled from a docker Registry and deploy app fro
|
||||
dokku tags:deploy test-app v12
|
||||
```
|
||||
|
||||
> Note: When deploying an image, we will use `docker inspect` to extract the `ExposedPorts` configuration and if defined, use that to populate `DOKKU_DOCKERFILE_PORTS`. If this behavior is not desired, you can override that configuration variable with the `config:set` command.
|
||||
> Example: `dokku config:set test-app DOKKU_DOCKERFILE_PORTS="5984/tcp 80/tcp"`
|
||||
|
||||
### Deploying an image from CI
|
||||
|
||||
To ensure your builds are always reproducible, it's considered bad practice to store build
|
||||
|
||||
Reference in New Issue
Block a user