server icon indicating copy to clipboard operation
server copied to clipboard

Create sample config.yml during first start

Open pm-pm opened this issue 6 years ago • 4 comments
trafficstars

During first start the directorys "images" and "plugins" and the db are created, but no default config.yml file.

images/
plugins/
gotify.db

It yould be very helpful (not onyl for beginners) to create a sample/default config.yml in the same directory where the binary is.

pm-pm avatar Mar 13 '19 15:03 pm-pm

But we would have no idea on whether you want your config file to be placed in working dir or /etc/gotify/, also I cannot predict whether you might want to use environment variables for configuration.

But I think we can include a default config in the release package, so when you decompress the archive the config file is extracted as well.

eternal-flame-AD avatar Mar 13 '19 15:03 eternal-flame-AD

I propose to create it in the same directory where the gotify "data/" folder which its subfolders is created. So all relevant folders, datas and configs are in the same place.

(When you create an official *.deb file then you can place the config file in "/etc/gotify".)

Having a sample config file in the release package would be a "quick win". Good idea.

pm-pm avatar Mar 13 '19 15:03 pm-pm

I still prefer my solution. The data directory does not necessarily exist: current references to that directory are only in the default configuration and user might want to override that.

eternal-flame-AD avatar Mar 13 '19 15:03 eternal-flame-AD

I agree with @eternal-flame-AD, lets include a default-config.yml in the zip.

jmattheis avatar Mar 14 '19 18:03 jmattheis