An open API service indexing awesome lists of open source software.

https://github.com/hollodotme/readis-docker-image

Official docker image for readis
https://github.com/hollodotme/readis-docker-image

Last synced: about 1 month ago
JSON representation

Official docker image for readis

Awesome Lists containing this project

README

        

![Docker Image Publishing](https://github.com/hollodotme/readis-docker-image/workflows/Docker%20Image%20Publishing/badge.svg)

# readis docker image

## Description

Official docker image for [readis](https://github.com/hollodotme/readis).

## Installation

```bash
docker pull hollodotme/readis
```

For all available tags have a look at https://hub.docker.com/r/hollodotme/readis/tags/

## Usage

Simplest way to use the image is [docker-compose](https://docs.docker.com/compose/).

First create the two necessary PHP config files for readis:

**`config/app.php`**
```php
'http://localhost:80/',
];
```

**`config/servers.php`**
```php
'Redis-Server 1',
'host' => 'your_redis_server',
'port' => 6379,
'auth' => null,
'timeout' => 2.5,
'retryInterval' => 100,
'databaseMap' => [],
],
];
```

For more information about the configuration files, have a look at
the [readis documentation](https://github.com/hollodotme/readis/blob/master/README.md).

**Please note:** The `host` value in the `servers.php` is the same as the redis service `container_name`
in the following `docker-compose.yml`.

Now create a `docker-compose.yml` to combine a default redis server instance with readis:

```yml
version: '3'
services:
redis:
container_name: your_redis_server
image: redis:3
readis:
container_name: your_readis
image: hollodotme/readis
ports:
- 80:80
volumes:
- ./config:/code/config:ro
depends_on:
- redis
```

**Please note:** The whole config folder was mounted into the readis container, so your config files take effect.

Finally `run docker-compose up -d` to fire up both containers.
As soon as the containers are running, visit http://localhost:80/.

## Contributing

Contributions are welcome and will be fully credited. Please see the [contribution guide](.github/CONTRIBUTING.md) for details.