refactor: moving config files to separate folder
This commit is contained in:
@@ -28,6 +28,7 @@ source("renv/activate.R")
|
|||||||
cli::cli_code(paste0("R_CONFIG_ACTIVE", "="))
|
cli::cli_code(paste0("R_CONFIG_ACTIVE", "="))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Sys.setenv(R_CONFIG_FILE = "config/config.yml")
|
||||||
|
|
||||||
})()
|
})()
|
||||||
|
|
||||||
@@ -35,8 +36,8 @@ source("renv/activate.R")
|
|||||||
# при первом запуске скопировать пример конфига
|
# при первом запуске скопировать пример конфига
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
if (!file.exists("config.yml")) {
|
if (!file.exists("config/config.yml")) {
|
||||||
file.copy("config_example.yml", "config.yml")
|
file.copy("config/config_example.yml", "config/config.yml")
|
||||||
}
|
}
|
||||||
|
|
||||||
})()
|
})()
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,7 +3,7 @@
|
|||||||
/_devel
|
/_devel
|
||||||
/all_bases
|
/all_bases
|
||||||
|
|
||||||
config.yml
|
config/config.yml
|
||||||
|
|
||||||
.Renviron
|
.Renviron
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ check_and_init_scheme = function() {
|
|||||||
|
|
||||||
# список файлов, изменение которых, приведут к переинициализиации схемы
|
# список файлов, изменение которых, приведут к переинициализиации схемы
|
||||||
files_to_watch <- c(
|
files_to_watch <- c(
|
||||||
"config.yml",
|
"config/config.yml",
|
||||||
"R/modules/scheme_generator.R",
|
"R/modules/scheme_generator.R",
|
||||||
"R/modules/utils.R"
|
"R/modules/utils.R"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ credentials <- data.frame(
|
|||||||
# Init the database
|
# Init the database
|
||||||
shinymanager::create_db(
|
shinymanager::create_db(
|
||||||
credentials_data = credentials,
|
credentials_data = credentials,
|
||||||
sqlite_path = "auth.sqlite", # will be created
|
sqlite_path = "config/auth.sqlite", # will be created
|
||||||
passphrase = Sys.getenv("AUTH_DB_KEY")
|
passphrase = Sys.getenv("AUTH_DB_KEY")
|
||||||
# passphrase = "passphrase_wihtout_keyring"
|
# passphrase = "passphrase_wihtout_keyring"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
default:
|
default:
|
||||||
form_app_version: !expr config::get("form_app_version", file = "descr.yml")
|
form_app_version: !expr config::get("form_app_version", file = "config/descr.yml")
|
||||||
form_id: !expr config::get("form_id", file = "descr.yml")
|
form_id: !expr config::get("form_id", file = "config/descr.yml")
|
||||||
form_name: !expr config::get("form_name", file = "descr.yml")
|
form_name: !expr config::get("form_name", file = "config/descr.yml")
|
||||||
|
|
||||||
prod:
|
prod:
|
||||||
form_app_configure_path: "example_scheme"
|
form_app_configure_path: "example_scheme"
|
||||||
Reference in New Issue
Block a user