incubator-answer icon indicating copy to clipboard operation
incubator-answer copied to clipboard

Init command with custom port

Open bestony opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe

Yes, If i run nginx local, i can't init answer with default config

Describe the solution you'd like

user can init answer with custom prompt (not just data dir)

Describe alternatives you've considered

  • add new flag for custom port
  • add feature only init file. don't try to start answer, let people change config ,and the start by manual.
  • add feature to load a full config file.

bestony avatar Mar 05 '24 11:03 bestony

You could use something like yq to change it to an alternate port:

yq -i '.server.http.addr="0.0.0.0:3200"' ./answer-data/conf/config.yaml

Then start answer:

./answer run -C ./answer-data/

calmdev avatar Mar 05 '24 22:03 calmdev

@bestony At answer init, you can use environment variables to specify arguments directly. FYI: https://answer.apache.org/docs/env

LinkinStars avatar Mar 06 '24 01:03 LinkinStars