From 6071c7f2d294c648c3ec0db1fc3ed3648659ea41 Mon Sep 17 00:00:00 2001 From: antonyzhilin Date: Mon, 25 Nov 2024 18:31:23 +0300 Subject: [PATCH] feat core: don't use config_dev.yaml by default commit_hash:fa275c966ec6e0926a86e9c55469f74f43b1d715 --- core/src/utils/daemon_run.cpp | 4 ++-- scripts/docs/en/userver/tutorial/hello_service.md | 1 - scripts/docs/en/userver/tutorial/multipart_service.md | 1 - scripts/docs/en/userver/tutorial/websocket_service.md | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/core/src/utils/daemon_run.cpp b/core/src/utils/daemon_run.cpp index e2da42df9702..e3e9c4d1d7b2 100644 --- a/core/src/utils/daemon_run.cpp +++ b/core/src/utils/daemon_run.cpp @@ -31,7 +31,7 @@ int DaemonMain(const int argc, const char* const argv[], const components::Compo po::variables_map vm; po::options_description desc("Allowed options"); - std::string config_path = "config_dev.yaml"; + std::string config_path; std::string config_vars_path; std::string config_vars_override_path; @@ -40,7 +40,7 @@ int DaemonMain(const int argc, const char* const argv[], const components::Compo ("help,h", "produce this help message") ("print-config-schema", "print config.yaml YAML Schema") ("print-dynamic-config-defaults", "print JSON object with dynamic config defaults") - ("config,c", po::value(&config_path)->default_value(config_path), "path to server config") + ("config,c", po::value(&config_path)->required(), "path to server config") ("config_vars", po::value(&config_vars_path), "path to config_vars.yaml; if set, config_vars in config.yaml are ignored") ("config_vars_override", po::value(&config_vars_override_path), "path to an additional config_vars.yaml, which overrides vars of config_vars.yaml") ; diff --git a/scripts/docs/en/userver/tutorial/hello_service.md b/scripts/docs/en/userver/tutorial/hello_service.md index ad6c654c1901..d0549112e224 100644 --- a/scripts/docs/en/userver/tutorial/hello_service.md +++ b/scripts/docs/en/userver/tutorial/hello_service.md @@ -124,7 +124,6 @@ paths in the configuration files and starts the service. To start the service manually run `./samples/hello_service/userver-samples-hello_service -c `. -@note Without file path to `static_config.yaml` `userver-samples-hello_service` will look for a file with name `config_dev.yaml` @note CMake doesn't copy `static_config.yaml` and file from `samples` directory into build directory. Now you can send a request to your server from another terminal: diff --git a/scripts/docs/en/userver/tutorial/multipart_service.md b/scripts/docs/en/userver/tutorial/multipart_service.md index d7ef4284017d..39a7365f6790 100644 --- a/scripts/docs/en/userver/tutorial/multipart_service.md +++ b/scripts/docs/en/userver/tutorial/multipart_service.md @@ -116,7 +116,6 @@ paths in the configuration files and starts the service. To start the service manually run `./samples/multipart_service/userver-samples-multipart_service -c `. -@note Without file path to `static_config.yaml` `userver-samples-multipart_service` will look for a file with name `config_dev.yaml` @note CMake doesn't copy `static_config.yaml` files from `samples` directory into build directory. Now you can send a request to your server from another terminal: diff --git a/scripts/docs/en/userver/tutorial/websocket_service.md b/scripts/docs/en/userver/tutorial/websocket_service.md index 6aef8e7a9c6a..fd3f5e840eaf 100644 --- a/scripts/docs/en/userver/tutorial/websocket_service.md +++ b/scripts/docs/en/userver/tutorial/websocket_service.md @@ -60,7 +60,6 @@ paths in the configuration files and starts the service. To start the service manually run `./samples/websocket_service/userver-samples-websocket_service -c `. -@note Without file path to `static_config.yaml` `userver-samples-websocket_service` will look for a file with name `config_dev.yaml` @note CMake doesn't copy `static_config.yaml` file from `samples` directory into build directory. Now you can send messages to your server from another terminal: