diff --git a/README.md b/README.md index 6869e84..bb3685e 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ $ ./wakapi -config wakapi.yml **Note:** Check the comments in `config.yml` for best practices regarding security configuration and more. -💡 When running Wakapi standalone (without Docker), it is recommended to run it as a [SystemD service](etc/wakapi.service). +💡 When running Wakapi standalone (without Docker), it is recommended to run it as a [SystemD service](etc/wakapi.service). ### 💻 Client setup @@ -161,6 +161,7 @@ You can specify configuration options either via a config file (default: `config | `security.expose_metrics` /
`WAKAPI_EXPOSE_METRICS` | `false` | Whether to expose Prometheus metrics under `/api/metrics` | | `db.host` /
`WAKAPI_DB_HOST` | - | Database host | | `db.port` /
`WAKAPI_DB_PORT` | - | Database port | +| `db.socket` /
`WAKAPI_DB_SOCKET` | - | Database UNIX socket (alternative to `host`) (for MySQL only) | | `db.user` /
`WAKAPI_DB_USER` | - | Database user | | `db.password` /
`WAKAPI_DB_PASSWORD` | - | Database password | | `db.name` /
`WAKAPI_DB_NAME` | `wakapi_db.db` | Database name | diff --git a/config.default.yml b/config.default.yml index 70045c8..f2ae238 100644 --- a/config.default.yml +++ b/config.default.yml @@ -36,6 +36,7 @@ app: db: host: # leave blank when using sqlite3 port: # leave blank when using sqlite3 + socket: # alternative to db.host (leave blank when using sqlite3) user: # leave blank when using sqlite3 password: # leave blank when using sqlite3 name: wakapi_db.db # database name for mysql / postgres or file path for sqlite (e.g. /tmp/wakapi.db) diff --git a/main.go b/main.go index c916e54..b389a40 100644 --- a/main.go +++ b/main.go @@ -321,7 +321,7 @@ func listen(handler http.Handler) { } // UNIX domain socket - if config.Server.ListenSocket != "" { + if config.Server.ListenSocket != "-" && config.Server.ListenSocket != "" { // Remove if exists if _, err := os.Stat(config.Server.ListenSocket); err == nil { logbuch.Info("--> Removing unix socket %s", config.Server.ListenSocket)