Skip to content

Commit

Permalink
Merge pull request #133 from dokku/132-ssh-format-docs
Browse files Browse the repository at this point in the history
Document the GIT_REMOTE_URL format
  • Loading branch information
josegonzalez authored Feb 2, 2025
2 parents 228a21b + 9f28ab9 commit 2190ebb
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The following environment variables are supported:
- required: false
- default: ''
- `GIT_REMOTE_URL:`
- description: The dokku app's git repository url (in SSH format)
- description: The dokku app's git repository url (in SSH format, see below)
- required: true
- `GIT_PUSH_FLAGS:`
- description: A string containing a set of flags to set on push
Expand All @@ -96,6 +96,26 @@ The following environment variables are supported:
- required: false
- default: ''

### `GIT_REMOTE_URL` SSH Format

The `GIT_REMOTE_URL` value should be specified in SSH Format, as shown below:

```shell
# without port specified
ssh://[email protected]/node-js-app

# with the optional port specified
ssh://[email protected]:22/node-js-app

# generalized form
ssh://dokku@HOSTNAME:PORT/APP_NAME
```

This format mimics the DSN format. It is similar to the one in use by a normal `git push dokku main` command, though with a change on how the app name is separated by a slash from the rest of the hostname. The port is completely optional, but allows users to rebind the SSH server to another port as necessary.

> [!IMPORTANT]
> The SSH key _must_ be added to the dokku user via the `dokku ssh-keys:add` command and _not_ manually or the app name will not be properly detected.
### Hooks

This image allows a variety of file-based hooks to be triggered during the app
Expand Down

0 comments on commit 2190ebb

Please sign in to comment.