Fixed Docker UPGRADING instructions

This commit is contained in:
mdecimus
2024-05-15 16:02:36 +02:00
parent 5ae7a0b7d4
commit 7baa088a19
4 changed files with 224 additions and 199 deletions

402
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -37,7 +37,7 @@ Version `0.8.0` includes both performance and security enhancements that require
```bash
$ docker stop stalwart-mail
$ docker run --rm -it stalwart-mail /opt/stalwart-mail/bin/stalwart-mail --config /opt/stalwart-mail/etc/config.toml --export /opt/stalwart-mail/export
$ docker run --rm -v <STALWART_DIR>:/opt/stalwart-mail -it stalwart-mail /opt/stalwart-mail/bin/stalwart-mail --config /opt/stalwart-mail/etc/config.toml --export /opt/stalwart-mail/export
```
- Backup your `v0.7.3` installation:
- If you are using RocksDB or SQLite, simply rename the `data` directory to `data-backup`, for example:
@@ -74,7 +74,7 @@ Version `0.8.0` includes both performance and security enhancements that require
or, if you are using the Docker image:
```bash
$ docker run --rm -it stalwart-mail /opt/stalwart-mail/bin/stalwart-mail --config /opt/stalwart-mail/etc/config.toml --import /opt/stalwart-mail/export
$ docker run --rm -v <STALWART_DIR>:/opt/stalwart-mail -it stalwart-mail /opt/stalwart-mail/bin/stalwart-mail --config /opt/stalwart-mail/etc/config.toml --import /opt/stalwart-mail/export
```
- Start the service:
```bash

View File

@@ -21,10 +21,14 @@
* for more details.
*/
use std::collections::HashMap;
use prettytable::{Attr, Cell, Row, Table};
use reqwest::Method;
use serde_json::Value;
use crate::modules::Response;
use super::cli::{Client, ServerCommands};
impl ServerCommands {
@@ -70,12 +74,13 @@ impl ServerCommands {
}
ServerCommands::ListConfig { prefix } => {
let results = client
.http_request::<Vec<(String, String)>, String>(
.http_request::<Response<HashMap<String, String>>, String>(
Method::GET,
&format!("/api/settings/{}", prefix.unwrap_or_default()),
&format!("/api/settings/list/{}", prefix.unwrap_or_default()),
None,
)
.await;
.await
.items;
if !results.is_empty() {
let mut table = Table::new();

View File

@@ -123,6 +123,12 @@ pub struct List<T> {
pub total: u64,
}
#[derive(Clone, serde::Serialize, serde::Deserialize, Default)]
pub struct Response<T> {
pub items: T,
pub total: u64,
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct PrincipalUpdate {
action: PrincipalAction,