From 115a62c0fea153273c91dc2a0040dece53aa4542 Mon Sep 17 00:00:00 2001 From: Grzegorz Lachowski Date: Tue, 5 Sep 2023 09:41:45 +0200 Subject: [PATCH] docker migration article adjustments --- .../migration/server/docker.markdown | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Documentation/6.0/Raven.Documentation.Pages/migration/server/docker.markdown b/Documentation/6.0/Raven.Documentation.Pages/migration/server/docker.markdown index 5ddadc0867..1f1e962cea 100644 --- a/Documentation/6.0/Raven.Documentation.Pages/migration/server/docker.markdown +++ b/Documentation/6.0/Raven.Documentation.Pages/migration/server/docker.markdown @@ -21,7 +21,7 @@ --- -{PANEL: Changes Made In RavenDB `6.0` And Up} +{PANEL: Changes Made In RavenDB 6.0 And Up} The **directory structure** used by RavenDB of version `6.0` and above, and the **user** we use to run RavenDB, are different @@ -29,7 +29,7 @@ from the directory structure and user used by older versions. * RavenDB Docker images up to `5.x`: * Create a unique directory structure under Windows. - * Are installed and accessed using the `root` user. + * Are installed and accessed using the `root` user on Ubuntu. * RavenDB Docker images from `6.0` up: * Use a Debian archive file ([.deb package](../../start/installation/gnu-linux/deb)) @@ -44,18 +44,17 @@ from version `5.x` or lower to version `6.0` or higher. {PANEL: Migrating To `6.0` And Up} -## Permit the `ravendb` user to access the image directory. +## Permit `ravendb` user to access mounted data directory. The default **UID** (User ID) and **GID** (Group ID) used by `ravendb` are **999**. -Set the data directory permissions to these values (or -any other values you give `ravendb`). -E.g., `chown -R 999:999 $TARGET_DATA_DIR` +Change owner of the RavenDB data direcory to `ravendb` (`999` UID by default) on the container host. +E.g. `chown -R 999:999 $TARGET_DATA_DIR` -## Build the Ubuntu package +## Customizing the RavenDB data directory owner user UID/GID -Build the Ubuntu package yourself with the same **UID** and -**GID** values, using the following arguments: +In order to use a custom UID/GID for the `ravendb` user please build the Ubuntu container image yourself providing desired **UID** and +**GID** values, using the following arguments upon build: **UID**: `--build-arg "RAVEN_USER_ID=999"` **GID**: `--build-arg "RAVEN_GROUP_ID=999"` E.g., `docker build --build-arg "RAVEN_USER_ID=999" --build-arg "RAVEN_GROUP_ID=999" <...>` @@ -66,12 +65,13 @@ The setup process will create the directory structure detailed [here](../../start/installation/gnu-linux/deb#file-system-locations). The script within the image will attempt to link the old version's -data directory to the new version's data directory automatically. +data directory to the new version's data directory automatically upon start. If this attempt fails, an error will be produced. -When setup is done, **migrate or link** the contents stored in the -old RavenDB directories to the newly created directory structure. -Most notably, make sure that the **data** is available in its new -location: `/var/lib/ravendb/data` +When mounting host directory make sure that **RavenDB data** is mounted under its new +location on the container: `/var/lib/ravendb/data` + +Old data directory (default): `/opt/RavenDB/Server/RavenData` +New data directory (default): `/var/lib/ravendb/data` {PANEL/}