这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/getting-started/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,25 @@ Save the file and try stopping nginx and starting it again:
## * Starting nginx nginx [ OK ]
```

---

Using the `EXPOSE` directive in a Dockerfile may be another reason why you might see the default site. When the `EXPOSE` directive is in use and a proxy plugin is enabled (the default), the proxy plugin will listen to requests on the ports specified in the `EXPOSE` stanza.

For example, if you have an `EXPOSE` directive like so:

```Dockerfile
EXPOSE 8000
```

The proxy port mapping will be `http:8000:8000`.

To avoid this issue, either of the following can be done:

- Remove `EXPOSE` directive: This will require respecting the `$PORT` environment variable (automatically set by Dokku). Once that change is deployed, the port mapping should be cleared via the `dokku proxy:ports-clear $APP` command (where `$APP` is your app name).
- Update the port mapping: Updating the port mapping to redirect port `80` to your app's exposed port via `dokku proxy:ports-set $APP http:80:$EXPOSED_PORT` can also fix the issue. This will also allow certificate management and the letsencrypt plugin to work correctly.

See the [port management documentation](/docs/networking/port-management.md) for more information on how Dokku exposes ports for applications and how you can configure these for your app.

### I want to deploy my app, but while pushing I get the following error

The following error may be emitted from a deploy:
Expand Down