Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ftr: read configuration path from the command line when start #1039

Merged
merged 3 commits into from
Feb 3, 2021

Conversation

cjphaha
Copy link
Member

@cjphaha cjphaha commented Feb 3, 2021

What this PR does:
Add feature :
Developers can add command line parameters when starting the program to set the location of log, provider, consumer and router configuration files.
If no parameters are added at startup, it will be read from the default environment variables same as before.
If you set environment variables and add parameters at startup, it will run according to the startup parameters.
Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

  • In https://github.com/dubbogo/dubbo-samples/dubbo-samples/golang/helloworld/dubbo/go-server/app
    You can start server width out setting environment variables, like this:
    go run . -proConf ../profiles/dev/server.yml -logConf ../profiles/dev/log.yml
    In https://github.com/dubbogo/dubbo-samples/dubbo-samples/golang/helloworld/dubbo/go-client/app
    You can start client like this:
    go run . -conConf ../profiles/dev/client.yml -logConf ../profiles/dev/log.yml
  • If you don’t want to start in this way, you can set the environment variables in go-server/app like this:
    export CONF_PROVIDER_FILE_PATH="../profiles/dev/server.yml"
    export APP_LOG_CONF_FILE="../profiles/dev/log.yml"
    then start the server
    go run .
  • if you set environment variables and parameters like this:
    export CONF_PROVIDER_FILE_PATH="../profiles/dev/server.yml"
    export APP_LOG_CONF_FILE="../profiles/dev/log.yml"
    go run . -conConf ../profiles/dev/client_new.yml
    under this circumstance “../profiles/dev/client_new.yml” is valid
    Does this PR introduce a user-facing change?:

@AlexStocks AlexStocks changed the title add read configuration path from the command line when start Ftr: read configuration path from the command line when start Feb 3, 2021
@AlexStocks AlexStocks added this to the v1.5.6 milestone Feb 3, 2021
@AlexStocks AlexStocks merged commit 2126ce0 into apache:1.5 Feb 3, 2021
AlexStocks added a commit that referenced this pull request Apr 14, 2021
Ftr: read configuration path from the command line when start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants