You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using command --storage.file="/etc/sablier/my-states.json" the container won't start and outputs error:
Bringing up specified services: sablier
[+] Running 1/1
✔ Container sablier Started 0.5s
time="2023-08-27T00:14:59Z" level=info msg="(version=1.4.0-beta.4, branch=HEAD, revision=720dc57935715b17fa0ae848554f8fae96a7730b)"
time="2023-08-27T00:14:59Z" level=info msg="using provider \"docker\""
panic: open "/etc/sablier/my-states.json": no such file or directory
goroutine 1 [running]:
github.com/acouvreur/sablier/cmd.glob..func2.1(0xc000450f00?, {0x195d987?, 0x8?, 0x8?})
/go/src/sablier/cmd/start.go:18 +0x98
github.com/spf13/cobra.(*Command).execute(0xc000450f00, {0xc0000ae080, 0x8, 0x8})
/go/pkg/mod/github.com/spf13/[email protected]/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0xc000450c00)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
github.com/acouvreur/sablier/cmd.Execute()
/go/src/sablier/cmd/root.go:26 +0x1e
main.main()
/go/src/sablier/main.go:10 +0x5a
The same error occurs whether I try to mount the file to the local filesystem or not (i.e. even if I have mounted a file to the correct path in the container it still says that no file exists).
If I instead try to do it with an environment variable (- STORAGE_FILE="/etc/sablier/my-states.json") the container does start but no file is created.
So by default (i.e. without specifying this config value) I didn't expect any state to be saved. But when the container is run without using this command arg or the environment variable the docker logs indicate that /etc/sablier/state.json is being used to save the state:
time="2023-08-27T00:17:08Z" level=info msg="initialized storage to /etc/sablier/state.json"
And the default /etc/cablier/sablier.yaml config file inside the container specifies:
storage:
file: /etc/sablier/state.json
So it looks like the service is trying to save the state. However nothing seems to be written to this file at all, it remains unchanged when containers are started/stopped.
Context
Sablier version: 1.4.0-beta.4
Provider: docker
Reverse proxy: traefik v2.10.4
Sablier running inside a container? Y
The text was updated successfully, but these errors were encountered:
Describe the bug
When using command
--storage.file="/etc/sablier/my-states.json"
the container won't start and outputs error:The same error occurs whether I try to mount the file to the local filesystem or not (i.e. even if I have mounted a file to the correct path in the container it still says that no file exists).
If I instead try to do it with an environment variable (
- STORAGE_FILE="/etc/sablier/my-states.json"
) the container does start but no file is created.I also note that the docs for this setting state:
So by default (i.e. without specifying this config value) I didn't expect any state to be saved. But when the container is run without using this command arg or the environment variable the docker logs indicate that
/etc/sablier/state.json
is being used to save the state:And the default
/etc/cablier/sablier.yaml
config file inside the container specifies:So it looks like the service is trying to save the state. However nothing seems to be written to this file at all, it remains unchanged when containers are started/stopped.
Context
The text was updated successfully, but these errors were encountered: