dice icon indicating copy to clipboard operation
dice copied to clipboard

Creating and respecting `dice.conf` file

Open arpitbbhayani opened this issue 1 year ago • 10 comments

Add one sub-command in dice called init-config that would create the .conf file for DiceDB. This file should be exactly what redis.conf is. It is okay if we are not supporting all options and configurations mentioned. Let's respect the following to start with

  1. port
  2. requirepass
go run main.go init-config

The default path of the dice.conf file should be /etc/dicedb/dice.conf. But by passing -o in init-config we should be able to change the location.

Also, add support for flag -c <path to config file> that user can pass while starting the server. and we should read the config and respect the configurations.

go run main.go server -c /etc/dice.conf

When the server starts, if -c flag is passed, read and use that config file. if not

  1. check dice.conf in current directory
  2. check /etc/dicedb/dice.conf file

maintain this as a list in the code so that we can define the order in which we will check the presence of the conf file. Also, when the server starts, output the dice.conf file it is using.

Note, For every configuration in dice.conf there will be a sane default and if no conf exists, we use that sane default.

arpitbbhayani avatar Aug 29 '24 07:08 arpitbbhayani

@arpitbbhayani would like to work on this.

lucifercr07 avatar Aug 29 '24 07:08 lucifercr07

@lucifercr07 thanks for taking this up. go for it!

arpitbbhayani avatar Aug 29 '24 07:08 arpitbbhayani

@arpitbbhayani could you assign it to me?

vinitparekh17 avatar Aug 29 '24 13:08 vinitparekh17

@arpitbbhayani Can you assign me this issue. I want to work on this

TheRanomial avatar Aug 29 '24 13:08 TheRanomial

Hello @vinitparekh17,

There has been no activity on this issue for the past 5 days. It would be awesome if you keep posting updates to this issue so that we know you are actively working on it.

We are really eager to close this issue at the earliest, hence if we continue to see the inactivity, we will have to reassign the issue to someone else. We are doing this to ensure that the project maintains its momentum and others are not blocked on this work.

Just drop a comment with the current status of the work or share any issues you are facing. We can always chip in to help you out.

Thanks again.

arpitbbhayani avatar Sep 13 '24 06:09 arpitbbhayani

@arpitbbhayani Can I pick this up?

codeasashu avatar Sep 13 '24 17:09 codeasashu

@arpitbbhayani To add to this, presence of flags to cmd line params will always have highest priority than config file. I really liked how convoy uses configs, combining with presence of flags

codeasashu avatar Sep 13 '24 17:09 codeasashu

Hello @vinitparekh17,

There has been no activity on this issue for the past 5 days. It would be awesome if you keep posting updates to this issue so that we know you are actively working on it.

We are really eager to close this issue at the earliest, hence if we continue to see the inactivity, we will have to reassign the issue to someone else. We are doing this to ensure that the project maintains its momentum and others are not blocked on this work.

Just drop a comment with the current status of the work or share any issues you are facing. We can always chip in to help you out.

Thanks again.

Hello @arpitbbhayani,

Thank you for the reminder. I’ve been actively incorporating feedback from the community and am working to complete the task soon. You can check the progress in the PR here.

I appreciate your patience and will provide updates as I move forward. If you have any questions or additional feedback, please let me know!

Thanks again.

vinitparekh17 avatar Sep 13 '24 17:09 vinitparekh17

Hello @vinitparekh17, I see your PR got merged. https://github.com/DiceDB/dice/pull/450/

Thank you so much for taking this up. this was one of the most critical things that we wanted for a great UX and so happy to see this getting merged :) super thanks for doing this.

should I close this issue now?

arpitbbhayani avatar Sep 15 '24 03:09 arpitbbhayani

Hello @vinitparekh17, I see your PR got merged. #450

Thank you so much for taking this up. this was one of the most critical things that we wanted for a great UX and so happy to see this getting merged :) super thanks for doing this.

should I close this issue now?

@arpitbbhayani, It's an honor to be part of this community, and I look forward to working on more issues like this in the future.

If our desired outcome has been fulfilled, we can go ahead and close this issue. Once again, thank you for your patience and for giving me the opportunity to contribute.

vinitparekh17 avatar Sep 15 '24 03:09 vinitparekh17

Closing the issue, merged as part of https://github.com/DiceDB/dice/pull/450. Thanks @vinitparekh17 for contributing.

lucifercr07 avatar Sep 16 '24 04:09 lucifercr07