Makefile, Dockerfile, GoReleaser, config.yml, systemd service
This commit is contained in:
parent
a66bd6dad7
commit
e1c9fef6dc
16 changed files with 512 additions and 68 deletions
18
config/config.go
Normal file
18
config/config.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Package config provides the main configuration
|
||||
package config
|
||||
|
||||
const (
|
||||
DefaultListenHTTP = ":80"
|
||||
)
|
||||
|
||||
// Config is the main config struct for the application. Use New to instantiate a default config struct.
|
||||
type Config struct {
|
||||
ListenHTTP string
|
||||
}
|
||||
|
||||
// New instantiates a default new config
|
||||
func New(listenHTTP string) *Config {
|
||||
return &Config{
|
||||
ListenHTTP: listenHTTP,
|
||||
}
|
||||
}
|
9
config/config.yml
Normal file
9
config/config.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
# ntfy config file
|
||||
|
||||
# Listen address for the HTTP web server
|
||||
#
|
||||
# Format: <hostname>:<port>
|
||||
# Default: :80
|
||||
# Required: No
|
||||
#
|
||||
# listen-http: ":80"
|
10
config/ntfy.service
Normal file
10
config/ntfy.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=ntfy server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ntfy
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue