Skip to content

Commit

Permalink
fixes #28, closes #43: documentation for last changes improved
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Jul 10, 2023
1 parent c12681d commit f932ccb
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ LABEL maintainer="Emerson Rocha <rocha@ieee.org>"

ARG UWAZI_GIT_RELEASE_REF=production

# see https://github.com/nodejs/docker-node#how-to-use-this-image

## Install common software
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
bzip2 \
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ docker compose run -e IS_FIRST_RUN=true --rm uwazi # Install/Re-install from emp

With very fast internet and disks, this step will take between 8 to 15 minutes.

<details>
<summary>(Advanced) All initialization options with default values</summary>

Uwazi docker fetch data from git, and a very specific release (UWAZI_GIT_RELEASE_REF defaults to tag production, but this likely eventually will require upgrade uwazi-docker itself) and initialize with empty database (DB_INITIALIZATION_PATH, but you may want to change for a example test database, or even upstream might change path in the future).

With this in mind, the default values might need updates (which in this case please open an issue and report the problem) but in the meantime you can just change the options.

<pre>
git clone https://github.com/fititnt/uwazi-docker.git
cd uwazi-docker
docker compose run -e IS_FIRST_RUN=true UWAZI_GIT_RELEASE_REF=production DB_INITIALIZATION_PATH=/home/node/uwazi/dump/uwazi_development --rm uwazi
</pre>
</details>

### Run

```bash
Expand Down
26 changes: 24 additions & 2 deletions upgrade-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
to a new one of Uwazi software.** Tip: the most important parts are MongoDB
database and the uploaded_documents

At the moment, uwazi-docker has commands that facilitate the first installation
of the software, but upgrades from an old version of uwazi to a new one that
<s>At the moment, uwazi-docker has commands that facilitate the first installation
of the software, but</s> upgrades from an old version of uwazi to a new one that
involve updating the database **require following official uwazi documentation**.

- See: Upgrading Uwazi and data migrations at <https://github.com/huridocs/uwazi#upgrading-uwazi-and-data-migrations>.
Expand All @@ -13,3 +13,25 @@ Tip: see docker exec documentation at <https://docs.docker.com/engine/reference/
to undestand how to run commands inside the container that runs the uwazi and
run the commands that both update database and documents from older to the
new version.

#### `yarn migrate` and `yarn reindex`

At installation step the `yarn migrate` and `yarn reindex` are always executed,
however the database will be erased to a blank state.
However, if for some you already have real data and not major database upgrade,
in which MongoDB and ElasticSearch might need some minor custom steps outside of Uwazi control,
this command will run once only the `yarn migrate` and `yarn reindex`.

```bash
docker compose run -e RUN_YARN_MIGRATE_REINDEX=true --rm uwazi
```

Just to be sure, if working with real data, **please backup the volumes first**.

#### Major upgrade of MongoDB
Please check MongoDB documentation.

Please also open an issue on this repository if the way uwazi-docker run with newer MongoDB need changes. This was the case with last MongoDB upgrade (need some googling to replace the parameters, not hard).

#### Major upgrade of ElasticSearch
Please check ElasticSearch documentation and report issues here.

0 comments on commit f932ccb

Please sign in to comment.