mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
chore: minor changes
This commit is contained in:
parent
db6dde32cd
commit
8a26e24081
@ -109,7 +109,7 @@ $ ./wakapi -config wakapi.yml
|
|||||||
|
|
||||||
**Note:** Check the comments in `config.yml` for best practices regarding security configuration and more.
|
**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
|
### 💻 Client setup
|
||||||
|
|
||||||
@ -161,6 +161,7 @@ You can specify configuration options either via a config file (default: `config
|
|||||||
| `security.expose_metrics` /<br> `WAKAPI_EXPOSE_METRICS` | `false` | Whether to expose Prometheus metrics under `/api/metrics` |
|
| `security.expose_metrics` /<br> `WAKAPI_EXPOSE_METRICS` | `false` | Whether to expose Prometheus metrics under `/api/metrics` |
|
||||||
| `db.host` /<br> `WAKAPI_DB_HOST` | - | Database host |
|
| `db.host` /<br> `WAKAPI_DB_HOST` | - | Database host |
|
||||||
| `db.port` /<br> `WAKAPI_DB_PORT` | - | Database port |
|
| `db.port` /<br> `WAKAPI_DB_PORT` | - | Database port |
|
||||||
|
| `db.socket` /<br> `WAKAPI_DB_SOCKET` | - | Database UNIX socket (alternative to `host`) (for MySQL only) |
|
||||||
| `db.user` /<br> `WAKAPI_DB_USER` | - | Database user |
|
| `db.user` /<br> `WAKAPI_DB_USER` | - | Database user |
|
||||||
| `db.password` /<br> `WAKAPI_DB_PASSWORD` | - | Database password |
|
| `db.password` /<br> `WAKAPI_DB_PASSWORD` | - | Database password |
|
||||||
| `db.name` /<br> `WAKAPI_DB_NAME` | `wakapi_db.db` | Database name |
|
| `db.name` /<br> `WAKAPI_DB_NAME` | `wakapi_db.db` | Database name |
|
||||||
|
@ -36,6 +36,7 @@ app:
|
|||||||
db:
|
db:
|
||||||
host: # leave blank when using sqlite3
|
host: # leave blank when using sqlite3
|
||||||
port: # 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
|
user: # leave blank when using sqlite3
|
||||||
password: # 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)
|
name: wakapi_db.db # database name for mysql / postgres or file path for sqlite (e.g. /tmp/wakapi.db)
|
||||||
|
2
main.go
2
main.go
@ -321,7 +321,7 @@ func listen(handler http.Handler) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UNIX domain socket
|
// UNIX domain socket
|
||||||
if config.Server.ListenSocket != "" {
|
if config.Server.ListenSocket != "-" && config.Server.ListenSocket != "" {
|
||||||
// Remove if exists
|
// Remove if exists
|
||||||
if _, err := os.Stat(config.Server.ListenSocket); err == nil {
|
if _, err := os.Stat(config.Server.ListenSocket); err == nil {
|
||||||
logbuch.Info("--> Removing unix socket %s", config.Server.ListenSocket)
|
logbuch.Info("--> Removing unix socket %s", config.Server.ListenSocket)
|
||||||
|
Loading…
Reference in New Issue
Block a user