Closed glsf91 closed 3 years ago
I solved it already with using a seperate working directory and put the config and logs dir en appsetting.json in this directory. And then starting up the application from this directory.
But now I get errors in the UI. In the log I see this kind of 404 errors: http://xxx.xxx:8443/lib/bootstrap/dist/css/flatly/bootstrap.min.css - - - 404
Strange, because I did not change anything in the appsetting.json When putting everything back in de software tree, it is working again. What can be the problem?
I use urls in de UI like https://xxx.xxx.nl:8443/GoogleDevice/Edit?deviceId=air. So no google/home in the url. I have no ASPNETCORE_PATHBASE or appPathBase defined.
Everything you need to touch needs to be in the config
directory off the root of the app. You shouldn't be touching the main appsettings.json
file, you should make a copy of it in config
called appsettings.ENV.json
where ENV
is the environment type ("Development" by default, which will work for you, though you will be running in a development mode then). You can change the ASPNETCORE_ENVIRONMENT
ENV setting to Production
and use appsettings.Production.json
to be inline with the actual config everyone else is using here.
I have the software installed in: /home/john/HomeAutio.Mqtt.GoogleHome In this directory there is a config dir (/home/john/HomeAutio.Mqtt.GoogleHome/config). But I want the config out of this /home/john/HomeAutio.Mqtt.GoogleHome directory because there also a lot of dll's and other dirs. So move config to for example: /home/john/HomeAutio/config. Then start application from inside this dir /home/john/HomeAutio/ .
Will this work?
The reason for moving out the config dir is that I build on another system. Tar the builded software tree and unpack on another system. This will overwrite the config tree if it is in the software tree.
No, there is not way to move these pieces from the application. You could probably do something like symbolic links in the file system, though.
Ok thanks.
I use the software standalone. So the appsettings.json and the config directory is in software directory tree. With Docker you can specify the config directory I see in the wiki. When installing a new release I have to backup the config files first and put them back after installing.
Is it also with standalone possible to put the config files outside the software tree and specifying them at with starting from the commandline ? (the appsettings.json and the config dir)
And in de appsettings.json are the following entries take also an absolute path ? "deviceConfigFile", "serviceAccountFile", tokenStoreFile and also path for Serilog.
Another minor thing: maybe an idea to show the version of the application in the UI somewhere.