404 if stork-server is installed in custom path
Steps
- Install server in a custom location.
$ rake install:server DEST=/opt/stork-server
mkdir -p /opt/stork-server
cp -a -f dist/server/. /opt/stork-server
- Start server.
$ stork-server
WARN[2024-01-30 15:16:24] restservice.go:354 Cannot read the base URL in the '/usr/share/stork/www/index.html' file because it is missing. If the files are located on separate machine, you need manually change the 'href' value of the <base> HTML tag to '/' error="open /usr/share/stork/www/index.html: no such file or directory"
- Attempt to open the UI in browser.
404 page not found
Expectation was that I get served /opt/stork-server/usr/share/stork/www/index.html
which exists.
Similarly, stork-server logs on startup:
WARN[2024-01-30 15:16:24] server.go:102 The hook directory: '/var/lib/stork-server/hooks' doesn't exist error="cannot find plugin paths in: /var/lib/stork-server/hooks: cannot list hook directory: /var/lib/stork-server/hooks: open /var/lib/stork-server/hooks: no such file or directory"
It would be nice if this was also looked up from the installation path and that the directory would be created on installation, so there would be no warnings by default.
This last one also happens with stork-agent.