Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details about how to retrieve ZIM file #1827

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,57 @@ without having to install all dependencies. You just need a working

## Standalone

MWoffliner requires a [Redis](http://www.redis.io) server to run.
MWoffliner requires a [Redis](https://www.redis.io) server to run.

For convenience purpose, MWoffliner image bundles a redis server launched in the background.
For convenience purpose, MWoffliner image bundles a Redis daemon launched in the background.

This bundled redis server is configured to be used only through a unix socket and to work exclusively from memory (no writes to disk).
This bundled Redis daemon is configured to be used only through a unix socket and to work exclusively from memory (no writes to disk).

Use of this bundled server is transparent as `mwoffliner` command is aliased to `mwoffliner --redis /dev/shm/redis.sock`.
Use of this bundled server is transparent as `mwoffliner` command is aliased to `mwoffliner --redis /dev/shm/redis.sock`.

``` sh
docker run -ti ghcr.io/openzim/mwoffliner mwoffliner --help
To run the following examples, you need first to create a local `out`
directory in you current directory. Created ZIM files will be written
there.

```sh
docker run --volume=$(pwd)/out:/out -ti ghcr.io/openzim/mwoffliner mwoffliner --help
```

## With dedicated redis
## With dedicated Redis

You can also use a dedicated redis container with MWoffliner.

Run a Redis docker container with:

```
$docker run --name=redis -d redis
```sh
docker run --volume=$(pwd)/out:/out --name=redis -d redis
```

... and then run the moffliner interactively (remember to specify `--redis` in command):

```
$docker run --link=redis:redis --name=mwoffliner -ti ghcr.io/openzim/mwoffliner
```sh
$docker run --volume=$(pwd)/out:/out --link=redis:redis --name=mwoffliner -ti ghcr.io/openzim/mwoffliner
```

... or non-interactively, directly with a command line (this is an
example, the second line is the mwoffliner command itself):

```
docker run --link=redis:redis --name=mwoffliner -e REDIS="redis://redis" ghcr.io/openzim/mwoffliner \
```sh
docker run --volume=$(pwd)/out:/out --link=redis:redis --name=mwoffliner -e REDIS="redis://redis" ghcr.io/openzim/mwoffliner \
mwoffliner --verbose --mwUrl=https://en.wikipedia.org/ --adminEmail=foo@bar.net
```

## With Docker compose

This allows to run both, Redis & MWoffliner, containers simultaneously:

```
```sh
docker-compose --file docker-compose.yml run mwoffliner
```

## Build the Docker image

Run from the repository root:
```
```sh
docker build . -f docker/Dockerfile -t ghcr.io/openzim/mwoffliner
```