Skip to content

Commit

Permalink
docker migration article adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
gregolsky committed Sep 5, 2023
1 parent 3941a39 commit 115a62c
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@

---

{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
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))
Expand All @@ -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" <...>`
Expand All @@ -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/}

0 comments on commit 115a62c

Please sign in to comment.