Skip to content

Commit

Permalink
Added KEEPALIVE_INTERVAL env var
Browse files Browse the repository at this point in the history
  • Loading branch information
dmotte committed Aug 25, 2024
1 parent ffbe525 commit 5c4a2cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ curl http://localhost/

For a more complex example, refer to the [`docker-compose.yml`](docker-compose.yml) file.

### Environment variables

List of supported **environment variables**:

| Variable | Required | Description |
| -------------------- | ---------------- | ---------------------------------------------------------------- |
| `KEEPALIVE_INTERVAL` | No (default: 30) | Value for the `ClientAliveInterval` option of the OpenSSH server |

## Development

If you want to contribute to this project, you can use the following one-liner to **rebuild the image** and bring up the **Docker-Compose stack** every time you make a change to the code:
Expand Down
4 changes: 3 additions & 1 deletion build/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -ex

keepalive_interval=${KEEPALIVE_INTERVAL:-30}

################################################################################

# Get host keys from the volume
Expand Down Expand Up @@ -66,4 +68,4 @@ done

# Start the OpenSSH Server with "exec" to ensure it receives all the stop
# signals correctly
exec /usr/sbin/sshd -De
exec /usr/sbin/sshd -De -oClientAliveInterval="$keepalive_interval"

0 comments on commit 5c4a2cb

Please sign in to comment.