From 1a746e49bbc1006606f3f5afa5eeb1ec11533c15 Mon Sep 17 00:00:00 2001 From: Juest Zungo Date: Wed, 6 Dec 2023 18:59:12 -0300 Subject: [PATCH 1/4] docs: command to persist database --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index a10c0b53..abdd5aaf 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,12 @@ After modifying a `translation/source/*.xml` file, run: docker compose run --rm ui /lila/bin/trans-dump ``` +### Make the database persistent + +```bash +docker cp lila-docker-mongodb-1:/data/db ./database +``` + ### Code formatting: ```bash From 11eb0b8a8abd5dcca0a186d3c3b0596c3acb8121 Mon Sep 17 00:00:00 2001 From: Juest Zungo Date: Sat, 9 Dec 2023 01:37:05 -0300 Subject: [PATCH 2/4] add database for persistence --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 52d6e16a..5f8e2ca3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ command/.cargo command/repos command/target +database From 840ee456c3e43c0c110d3586b28f48ebea6ccf28 Mon Sep 17 00:00:00 2001 From: Juest Zungo Date: Sun, 10 Dec 2023 16:12:38 +0000 Subject: [PATCH 3/4] update instructions for db persistence --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0dd93a69..5fa0b7c4 100644 --- a/README.md +++ b/README.md @@ -111,8 +111,9 @@ docker compose run --rm ui /lila/bin/trans-dump ### Make the database persistent ```bash -docker cp lila-docker-mongodb-1:/data/db ./database +docker compose cp mongodb:/data/db ./database ``` +then in `docker-compose.yml`add `- ./database:/data/db` to mongodb volumes ### Code formatting: From dc829b6629c5f2c6a281a4835266cce57acac23e Mon Sep 17 00:00:00 2001 From: Trevor Fitzgerald Date: Sun, 10 Dec 2023 14:24:37 -0500 Subject: [PATCH 4/4] formatting --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5fa0b7c4..5765c42e 100644 --- a/README.md +++ b/README.md @@ -108,19 +108,20 @@ After modifying a `translation/source/*.xml` file, run: docker compose run --rm ui /lila/bin/trans-dump ``` -### Make the database persistent +### Code formatting: ```bash -docker compose cp mongodb:/data/db ./database +./lila-docker format ``` -then in `docker-compose.yml`add `- ./database:/data/db` to mongodb volumes -### Code formatting: +### Optional: Make the database persistent ```bash -./lila-docker format +docker compose cp mongodb:/data/db ./database ``` +Then in `docker-compose.yml`add `- ./database:/data/db` to mongodb volumes + ### Berserk (Python library): To install the development version of [Berserk](https://github.com/lichess-org/berserk) and run a sample script against your local development site: