Skip to content

Commit 4b5bee8

Browse files
committed
Fix envs for store path #567
1 parent 4e7a7a6 commit 4b5bee8

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See [STATUS.md](server/STATUS.md) to learn more about which features will remain
1414
- Update JS assets & playwright
1515
- Fix initial indexing bug #560
1616
- Fix errors on succesful export / import #565
17+
- Fix envs for store path, change `ATOMIC_STORE_DIR` to `ATOMIC_DATA_DIR` #567
1718

1819
## [v0.34.0] - 2022-10-31
1920

server/default.env

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515
# Path to where most of your atomic data files will be stored (config + data, by default).
1616
# ATOMIC_CONFIG_DIR="/Users/your_home_folder/.config/atomic"
1717

18-
# Path to where your data will be stored.
19-
# ATOMIC_STORE_PATH="/Users/your_home_folder/.config/atomic/db"
18+
# Path to where most of the peristent data will be stored. Depends on your OS.
19+
# ATOMIC_DATA_DIR="/Users/your_home_folder/.config/atomic"
20+
21+
# Path to where the core database will be stored. Defaults to ATOMIC_DATA_DIR/store
22+
# ATOMIC_STORE_PATH="/Users/your_home_folder/.config/atomic/store
2023

2124
# Path to where your config will be stored.
2225
# ATOMIC_CONFIG_FILE_PATH="/Users/your_home_folder/.config/atomic/config.toml"

server/src/config.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ pub struct Opts {
6565
#[clap(long, env = "ATOMIC_CONFIG_DIR")]
6666
pub config_dir: Option<PathBuf>,
6767

68-
/// Path for atomic data store folder.
69-
#[clap(long, env = "ATOMIC_STORE_DIR")]
68+
/// Path for atomic data store folder. Contains your Store, uploaded files and more. Default value depends on your OS.
69+
#[clap(long, env = "ATOMIC_DATA_DIR")]
7070
pub data_dir: Option<PathBuf>,
7171

7272
/// CAUTION: Makes data publicly readable on the `/search` endpoint. When enabled, it allows POSTing to the /search endpoint and returns search results as single triples, without performing authentication checks. See https://github.com/atomicdata-dev/atomic-data-rust/blob/master/server/rdf-search.md
@@ -170,23 +170,23 @@ pub struct Config {
170170
/// CLI + ENV options
171171
pub opts: Opts,
172172
// === PATHS ===
173-
/// Path for atomic data config `~/.config/atomic/`. Used to construct most other paths.
173+
/// Path for atomic data config. Used to construct most other paths.
174174
pub config_dir: PathBuf,
175-
/// Path where TLS key should be stored for HTTPS. (defaults to `~/.config/atomic/https/key.pem`)
175+
/// Path where TLS key should be stored for HTTPS.
176176
pub key_path: PathBuf,
177-
/// Path where TLS certificate should be stored for HTTPS. (defaults to `~/.config/atomic/https/cert.pem`)
177+
/// Path where TLS certificate should be stored for HTTPS.
178178
pub cert_path: PathBuf,
179-
/// Path where TLS certificates should be stored for HTTPS. (defaults to `~/.config/atomic/https`)
179+
/// Path where TLS certificates should be stored for HTTPS.
180180
pub https_path: PathBuf,
181-
/// Path where config.toml is located, which contains info about the Agent (defaults to `~/.config/atomic/config.toml`)
181+
/// Path where config.toml is located, which contains info about the Agent
182182
pub config_file_path: PathBuf,
183183
/// Path where the public static files folder is located
184184
pub static_path: PathBuf,
185185
/// Path to where the store / database is located.
186186
pub store_path: PathBuf,
187187
/// Path to where the uploaded files are stored.
188188
pub uploads_path: PathBuf,
189-
/// Path to where the search index for tantivy full text search is located (defaults to `~/.config/atomic/search_index`)
189+
/// Path to where the search index for tantivy full text search is located
190190
pub search_index_path: PathBuf,
191191
/// If true, the initialization scripts will be ran (create first Drive, Agent, indexing, etc)
192192
pub initialize: bool,
@@ -208,7 +208,6 @@ pub fn build_config(opts: Opts) -> AtomicServerResult<Config> {
208208
.expect("Could not find Project directories on your OS");
209209

210210
// Persistent user data
211-
212211
let data_dir = opts
213212
.data_dir
214213
.clone()

0 commit comments

Comments
 (0)