Unable to read Settings.json / Settings.yml
Version
latest - v1.0.30.0
Deployment Method
Web
Description
Been struggling with this for a while but can't see what I'm doing incorrectly. Trying to set my docker image to point to my config directory and read either a settings.yml or Settings.json
Been trying to follow here https://immichframe.dev/docs/getting-started/installation/docker
And for related issues but havent had any success 1
I'm assuming because im hitting log here
https://github.com/immichFrame/ImmichFrame/blob/main/ImmichFrame.WebApi/Helpers/Config/ConfigLoader.cs#L87
I'm not reading my config directory but a little unsure what i'm doing incorrectly.
Reproduction
I have my Settings.yml file in the directory
/home/pi_hole/Desktop/immichFrame:/app/Config
docker-compose-yml
immichframe:
container_name: immichframe
image: ghcr.io/immichframe/immichframe:main
restart: on-failure
volumes:
- /home/pi_hole/Desktop/immichFrame:/app/Config
# - PATH/TO/CUSTOMCSS/custom.css:/app/wwwroot/static/custom.css
ports:
- "9959:8080"
environment:
TZ: "Europe/Berlin"
When I spin up the image and load the page get the below error.
Expectations
No response
Configuration
Settings.yml
General:
AuthenticationSecret: "xxxxxxxxxx"
DownloadImages: false
RenewImagesDuration: 30
Webcalendars:
- calendarurl
RefreshAlbumPeopleInterval: 12
PhotoDateFormat: dd/MM/yyyy
ImageLocationFormat: 'City,State,Country'
WeatherApiKey: ''
UnitSystem: imperial
WeatherLatLong: '40.730610,-73.935242'
Webhook: null
Language: en
Interval: 20
TransitionDuration: 2
ShowClock: true
ClockFormat: 'hh:mm'
ClockDateFormat: 'eee, MMM d'
ShowProgressBar: true
ShowPhotoDate: true
ShowImageDesc: true
ShowPeopleDesc: true
ShowAlbumName: true
ShowImageLocation: true
PrimaryColor: '#f5deb3'
SecondaryColor: '#000000'
Style: none
BaseFontSize: 17px
ShowWeatherDescription: true
WeatherIconUrl: 'https://openweathermap.org/img/wn/{IconId}.png'
ImageZoom: true
ImagePan: false
ImageFill: false
Layout: splitview
Accounts:
- ImmichServerUrl: "http//localhost:2283"
ApiKey: "xxxxxxxc"
ImagesFromDate: null
ShowMemories: false
ShowFavorites: false
ShowArchived: false
ImagesFromDays: null
ImagesUntilDate: '2020-01-02'
Rating: null
Albums:
- 2bce7f48-975d-44b8-ab04-81b3fead8434
#ExcludedAlbums:
# - UUID
#People:
# - UUID
Accounts:
- ImmichServerUrl: "http//localhost:2283"
ApiKey: "xxxxxx"
ImagesFromDate: null
ShowMemories: false
ShowFavorites: false
ShowArchived: false
ImagesFromDays: null
ImagesUntilDate: '2020-01-02'
Rating: null
Albums:
- 8644b8d4-1b11-4f15-803e-a973f8f51ae4
#ExcludedAlbums:
# - UUID
#People:
# - UUID
Logs
_ _ _ ______
(_) (_) | | | ___|
_ _ __ ___ _ __ ___ _ ___| |__ | |_ _ __ __ _ _ __ ___ ___
| | '_ ` _ \| '_ ` _ \| |/ __| '_ \| _| '__/ _` | '_ ` _ \ / _ \
| | | | | | | | | | | | | (__| | | | | | | | (_| | | | | | | __/
|_|_| |_| |_|_| |_| |_|_|\___|_| |_\_| |_| \__,_|_| |_| |_|\___| Version 1.0.0.0
LogLevel: Information
25-12-16 16:29:22 warn: Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository[50] Using an in-memory repository. Keys will not be persisted to storage.
25-12-16 16:29:22 warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[59] Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
25-12-16 16:29:22 warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35] No XML encryptor configured. Key {69564d32-72ea-41a1-9bd4-a5ed7fcc6936} may be persisted to storage in unencrypted form.
25-12-16 16:29:23 info: Microsoft.Hosting.Lifetime[14] Now listening on: http://[::]:8080
25-12-16 16:29:23 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down.
25-12-16 16:29:23 info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production
25-12-16 16:29:23 info: Microsoft.Hosting.Lifetime[0] Content root path: /app
25-12-16 16:29:27 warn: ImmichFrame.WebApi.Helpers.Config.ConfigLoader[0] Failed to load config as env vars (No environment variables found)
25-12-16 16:29:27 fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HNHSMVJ6BLOA", Request id "0HNHSMVJ6BLOA:00000001": An unhandled exception was thrown by the application. ImmichFrame.Core.Exceptions.ImmichFrameException: Failed to load configuration at ImmichFrame.WebApi.Helpers.Config.ConfigLoader.LoadConfigRaw(String configPath) in /source/ImmichFrame.WebApi/Helpers/Config/ConfigLoader.cs:line 87 at ImmichFrame.WebApi.Helpers.Config.ConfigLoader.LoadConfig(String configPath) in /source/ImmichFrame.WebApi/Helpers/Config/ConfigLoader.cs:line 25 at Program.<>c__DisplayClass0_0.<<Main>$>b__2(IServiceProvider srv) in /source/ImmichFrame.WebApi/Program.cs:line 54 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme) at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at CustomAuthenticationMiddleware.InvokeAsync(HttpContext context) in /source/ImmichFrame.WebApi/Helpers/CustomAuthenticationMiddleware.cs:line 14 at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
25-12-16 16:30:19 info: Microsoft.Hosting.Lifetime[0] Application is shutting down...
Pre-Submission Checklist
-
[x] This is a bug report and not a feature request
-
[x] I have provided all of the required information to reproduce the bug (config, logs, etc.)
-
[x] I have checked for related issues and checked the documentation
ImmichServerUrl is missing a colon, and I think you should only have one "Accounts:" key (put both under that one).
thanks @3rob3, updated to below,
settings.yml
General:
AuthenticationSecret: "6d0390ec-d1ac-4645-bdfc-73f7c9a90c07"
DownloadImages: false
RenewImagesDuration: 30
Webcalendars:
- calendarurl
RefreshAlbumPeopleInterval: 12
PhotoDateFormat: dd/MM/yyyy
ImageLocationFormat: 'City,State,Country'
WeatherApiKey: ''
UnitSystem: imperial
WeatherLatLong: '40.730610,-73.935242'
Webhook: null
Language: en
Interval: 20
TransitionDuration: 2
ShowClock: true
ClockFormat: 'hh:mm'
ClockDateFormat: 'eee, MMM d'
ShowProgressBar: true
ShowPhotoDate: true
ShowImageDesc: true
ShowPeopleDesc: true
ShowAlbumName: true
ShowImageLocation: true
PrimaryColor: '#f5deb3'
SecondaryColor: '#000000'
Style: none
BaseFontSize: 17px
ShowWeatherDescription: true
WeatherIconUrl: 'https://openweathermap.org/img/wn/{IconId}.png'
ImageZoom: true
ImagePan: false
ImageFill: false
Layout: splitview
Accounts:
- ImmichServerUrl: "http://localhost:2283"
ApiKey: "xxxx"
ImagesFromDate: null
ShowMemories: false
ShowFavorites: false
ShowArchived: false
ImagesFromDays: null
ImagesUntilDate: '2020-01-02'
Rating: null
Albums:
- 2bce7f48-975d-44b8-ab04-81b3fead8434
#ExcludedAlbums:
# - UUID
#People:
# - UUID
- ImmichServerUrl: "http://localhost:2283"
ApiKey: "xxxxx"
ImagesFromDate: null
ShowMemories: false
ShowFavorites: false
ShowArchived: false
ImagesFromDays: null
ImagesUntilDate: '2020-01-02'
Rating: null
Albums:
- 8644b8d4-1b11-4f15-803e-a973f8f51ae4
#ExcludedAlbums:
# - UUID
#People:
# - UUID
But still seem to be getting the error for unable to find the config
LogLevel: Information
25-12-17 10:40:54 warn: Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository[50] Using an in-memory repository. Keys will not be persisted to storage.
25-12-17 10:40:54 warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[59] Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
25-12-17 10:40:54 warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35] No XML encryptor configured. Key {98d8e50c-d791-402e-8212-59546ccec506} may be persisted to storage in unencrypted form.
25-12-17 10:40:55 info: Microsoft.Hosting.Lifetime[14] Now listening on: http://[::]:8080
25-12-17 10:40:55 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down.
25-12-17 10:40:55 info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production
25-12-17 10:40:55 info: Microsoft.Hosting.Lifetime[0] Content root path: /app
25-12-17 10:41:03 warn: ImmichFrame.WebApi.Helpers.Config.ConfigLoader[0] Failed to load config as env vars (No environment variables found)
25-12-17 10:41:03 fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HNHTA1IDJJ69", Request id "0HNHTA1IDJJ69:00000001": An unhandled exception was thrown by the application. ImmichFrame.Core.Exceptions.ImmichFrameException: Failed to load configuration at ImmichFrame.WebApi.Helpers.Config.ConfigLoader.LoadConfigRaw(String configPath) in /source/ImmichFrame.WebApi/Helpers/Config/ConfigLoader.cs:line 87 at ImmichFrame.WebApi.Helpers.Config.ConfigLoader.LoadConfig(String configPath) in /source/ImmichFrame.WebApi/Helpers/Config/ConfigLoader.cs:line 25 at Program.<>c__DisplayClass0_0.<<Main>$>b__2(IServiceProvider srv) in /source/ImmichFrame.WebApi/Program.cs:line 54 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme) at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at CustomAuthenticationMiddleware.InvokeAsync(HttpContext context) in /source/ImmichFrame.WebApi/Helpers/CustomAuthenticationMiddleware.cs:line 14 at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Seems like docker doesn't have access to '/home/pi_hole/Desktop/immichFrame'. Run this command: ls -ld /home/pi_hole/Desktop/immichFrame
Seems like docker doesn't have access to '/home/pi_hole/Desktop/immichFrame'. Run this command: ls -ld /home/pi_hole/Desktop/immichFrame
Got this back
pi_hole@PI:~$ ls -ld /home/pi_hole/Desktop/immichFrame
drwxrwxr-x 3 pi_hole pi_hole 4096 Dec 16 15:26 /home/pi_hole/Desktop/immichFrame
@3rob3 I see what I was doing wrong 🤦
Checking the container
docker exec -it immichframe ls -l /app/Config
I had the directory as /app/Config/app/Config
Moving settings.yml to the root of /home/pi_hole/Desktop/immichFrame solved my issue.
Edit: So I had my settings.yml in /home/pi_hole/Desktop/immichFrame/app/Config
When I checked the container with docker exec -it immichframe ls -l I could see my settings.yml stored in /app/Config/app/Config
Do you mean you had it like: /home/pi_hole/Desktop/immichFrame/app/Config/settings.yml instead of: /home/pi_hole/Desktop/immichFrame/settings.yml ? Regardless, glad its working now!