Clarify readme, open up Redis port on dev boxes and update Stash config.

This commit is contained in:
Buster "Silver Eagle" Neece 2017-07-15 00:44:22 -05:00
parent c954bd2bd6
commit b27f3ec208
3 changed files with 18 additions and 8 deletions

View File

@ -41,7 +41,7 @@ AzuraCast supports these operating systems and architectures out of the box:
##### Docker Installation
* Any host running Docker Engine and Docker Compose 1.10.0 or higher
* Any host capable of running the latest Docker Engine and Docker Compose (included in installer)
##### Traditional Installation
@ -77,7 +77,7 @@ On the host machine with Git installed, clone this repository to any local direc
git clone https://github.com/AzuraCast/AzuraCast.git .
```
From that directory, run the following commands to install the latest versions of Docker and Docker Compose and set up the AzuraCast instance:
From that directory, run the following commands as root or a sudo-capable user to install the latest versions of Docker and Docker Compose and set up the AzuraCast instance:
```bash
chmod +x ./docker_*

View File

@ -110,7 +110,7 @@ return function (\Slim\Container $di, \App\Config $config) {
// Caching
$di['cache_driver'] = function ($di) {
$cache_driver = new \Stash\Driver\Redis([
$redis_options = [
'servers' => [
[
'server' => (APP_INSIDE_DOCKER) ? 'redis' : 'localhost',
@ -120,17 +120,23 @@ return function (\Slim\Container $di, \App\Config $config) {
// 'password' => '', // Must be commented out to have no authentication
'database' => 0,
]);
];
// Register Stash as session handler if necessary.
$pool = new \Stash\Pool($cache_driver);
$composite_driver = new \Stash\Driver\Composite([
'drivers' => [
new \Stash\Driver\Ephemeral(),
new \Stash\Driver\Redis($redis_options),
],
]);
$pool = new \Stash\Pool($composite_driver);
$pool->setNamespace(\App\Cache::getSitePrefix('session'));
$session = new \Stash\Session($pool);
\Stash\Session::registerHandler($session);
return $cache_driver;
return $composite_driver;
};
$di['cache'] = function ($di) {

View File

@ -15,4 +15,8 @@ services:
mariadb:
ports:
- "3306:3306"
- "3306:3306"
redis:
ports:
- "6379:6379"