fix(packaging): create required directories + improve alpine service startup
This commit is contained in:
parent
1ff29ae1fb
commit
f9b8d4f243
|
@ -101,6 +101,18 @@ nfpms:
|
||||||
file_info:
|
file_info:
|
||||||
mode: 0755
|
mode: 0755
|
||||||
packager: apk
|
packager: apk
|
||||||
|
- dst: /var/lib/emissary
|
||||||
|
type: dir
|
||||||
|
file_info:
|
||||||
|
mode: 0700
|
||||||
|
- dst: /usr/share/emissary
|
||||||
|
type: dir
|
||||||
|
file_info:
|
||||||
|
mode: 0700
|
||||||
|
- dst: /var/log/emissary
|
||||||
|
type: dir
|
||||||
|
file_info:
|
||||||
|
mode: 0700
|
||||||
scripts:
|
scripts:
|
||||||
postinstall: "misc/packaging/common/postinstall-server.sh"
|
postinstall: "misc/packaging/common/postinstall-server.sh"
|
||||||
- id: emissary-agent
|
- id: emissary-agent
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -14,6 +14,7 @@ require (
|
||||||
github.com/golang-migrate/migrate/v4 v4.15.2
|
github.com/golang-migrate/migrate/v4 v4.15.2
|
||||||
github.com/jackc/pgx/v5 v5.2.0
|
github.com/jackc/pgx/v5 v5.2.0
|
||||||
github.com/jedib0t/go-pretty/v6 v6.4.4
|
github.com/jedib0t/go-pretty/v6 v6.4.4
|
||||||
|
github.com/lestrrat-go/jwx/v2 v2.0.8
|
||||||
github.com/mitchellh/mapstructure v1.5.0
|
github.com/mitchellh/mapstructure v1.5.0
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/qri-io/jsonschema v0.2.1
|
github.com/qri-io/jsonschema v0.2.1
|
||||||
|
@ -50,7 +51,6 @@ require (
|
||||||
github.com/lestrrat-go/httpcc v1.0.1 // indirect
|
github.com/lestrrat-go/httpcc v1.0.1 // indirect
|
||||||
github.com/lestrrat-go/httprc v1.0.4 // indirect
|
github.com/lestrrat-go/httprc v1.0.4 // indirect
|
||||||
github.com/lestrrat-go/iter v1.0.2 // indirect
|
github.com/lestrrat-go/iter v1.0.2 // indirect
|
||||||
github.com/lestrrat-go/jwx/v2 v2.0.8 // indirect
|
|
||||||
github.com/lestrrat-go/option v1.0.0 // indirect
|
github.com/lestrrat-go/option v1.0.0 // indirect
|
||||||
github.com/lib/pq v1.10.7 // indirect
|
github.com/lib/pq v1.10.7 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
command="/usr/bin/emissary"
|
command="/usr/bin/emissary"
|
||||||
command_args="--config /etc/emissary/config.yml agent run"
|
command_args="--workdir /usr/share/emissary --config /etc/emissary/agent.yml agent run"
|
||||||
start_stop_daemon_args='--chdir /usr/share/emissary'
|
|
||||||
supervisor=supervise-daemon
|
supervisor=supervise-daemon
|
||||||
|
output_log="/var/log/emissary/agent.log"
|
||||||
|
error_log="$output_log"
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
command="/usr/bin/emissary"
|
command="/usr/bin/emissary"
|
||||||
command_args="--config /etc/emissary/config.yml server run"
|
command_args="--workdir /usr/share/emissary --config /etc/emissary/server.yml server run"
|
||||||
start_stop_daemon_args='--chdir /usr/share/emissary'
|
|
||||||
supervisor=supervise-daemon
|
supervisor=supervise-daemon
|
||||||
|
output_log="/var/log/emissary/server.log"
|
||||||
|
error_log="$output_log"
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
/usr/bin/emissary --workdir /usr/share/emissary --config /etc/emissary/server.yml server database migrate
|
||||||
|
}
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
|
|
Loading…
Reference in New Issue