Closed fraggom closed 7 months ago
Your configuration seems fine, the only things I can think of are:
I have an integration test that tests to a live system, perhaps have a look at that for inspiration?
https://github.com/VibeNL/GhostfolioSidekick/blob/master/IntegrationTests/Run.cs
Next week I'll see if I can add some more helpful logging
Thanks for the quick reply! So far, I am pretty sure this is a matter of file/folder permissions of the mounted folders.
Again, the logs:
"
2024/02/02 09:05:25,stderr, at GhostfolioSidekick.Configuration.ApplicationSettings..ctor() in /src/Configuration/ApplicationSettings.cs:line 12
2024/02/02 09:05:25,stderr," at System.IO.File.ReadAllText(String path, Encoding encoding)
"
2024/02/02 09:05:25,stderr," at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
"
2024/02/02 09:05:25,stderr," at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
"
2024/02/02 09:05:25,stderr," at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
"
2024/02/02 09:05:25,stderr," at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Int64& fileLength, UnixFileMode& filePermissions)
"
2024/02/02 09:05:25,stderr, --- End of inner exception stack trace ---
2024/02/02 09:05:25,stderr, ---> System.IO.IOException: Permission denied
2024/02/02 09:05:25,stderr,Unhandled exception. System.UnauthorizedAccessException: Access to the path '/app/gfsk/config' is denied.
the binds are mounted into the docker container with the respective owner flags of the host system. From what I see in the dockerhub, dotnet is running inside the container with a very specific uid:
ENV APP_UID=1654 ASPNETCORE_HTTP_PORTS=8080 DOTNET_RUNNING_IN_CONTAINER=true
Just a guess, since I am not an expert on this field, but I assume this could be the issue. I wonder no one else had this issue?!
I'm not a docker expert, but here is my config
ghostfoliosidekick: image: vibenl/ghostfoliosidekick:latest container_name: Ghostfolio-Ghostfoliosidekick hostname: ghostfoliosidekick security_opt:
Thank you! :-) I found the issue. My problem was the configuration file path pointing at a folder instead of a file:
So it was
CONFIGURATIONFILE_PATH: /gfsk/config
instead of
CONFIGURATIONFILE_PATH: /gfsk/config/config.json
Your welcome 😁
Hi everyone,
I am running into issues starting the docker container. It failed due to issues with the bind mounts and I couldn't find a solution. Logs say
Microsoft.Extensions.Hosting.Internal.Host Unhandled exception. System.UnauthorizedAccessException: Access to the path ... is denied.
My compose looks the following:
I was trying different destinations but always the same result. I was as well trying to start the container with user flags, but didn't work as well. Maybe you have an idea? thanks!