Skip to content

Commit

Permalink
Configure Systemd Socket Activation
Browse files Browse the repository at this point in the history
as new way for Poseidon to accept connections. This should reduce our issues caused by deployments.
  • Loading branch information
mpass99 committed Jan 15, 2024
1 parent eaddc65 commit 511b873
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/poseidon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ func serveHTTPListener(server *http.Server, l net.Listener) {
}

if errors.Is(err, http.ErrServerClosed) {
log.WithError(err).WithField("listener", l).Info("Server closed")
log.WithError(err).WithField("listener", l.Addr()).Info("Server closed")
} else {
log.WithError(err).WithField("listener", l).Error("Error during listening and serving")
log.WithError(err).WithField("listener", l.Addr()).Error("Error during listening and serving")
}
}

Expand Down
6 changes: 6 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ If a value is not specified, the value of the subsequent possibility is used.
- Again, this can be overwritten by the environment variable `POSEIDON_SERVER_PORT`, e.g., using `export POSEIDON_SERVER_PORT=5000`.

### Systemd

Poseidon can be configured to run as a systemd service. Poseidon can optionally also be configured to use a systemd socket.
The use of systemd provides capabilities for managing Poseidon's state and zero downtime deployments.
Minimal examples for systemd configurations can be found in `.github/workflows/resources`.


## Nomad

Expand Down

0 comments on commit 511b873

Please sign in to comment.