Merge pull request #1603 from pixelfed/staging

Allow redis to be used over a UNIX socket
This commit is contained in:
daniel 2019-08-13 01:55:29 -06:00 committed by GitHub
commit cb62ab4ecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 8 deletions

View file

@ -25,6 +25,7 @@ SESSION_DRIVER=redis
SESSION_LIFETIME=120
QUEUE_DRIVER=redis
REDIS_SCHEME=tcp
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

View file

@ -25,6 +25,7 @@ SESSION_DRIVER=redis
SESSION_LIFETIME=120
QUEUE_DRIVER=redis
REDIS_SCHEME=tcp
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

View file

@ -7,14 +7,7 @@ use Pixelfed\Snowflake\HasSnowflakePrimary;
class Place extends Model
{
use HasSnowflakePrimary;
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $incrementing = false;
protected $visible = ['id', 'name', 'country', 'slug'];
public function url()
{
@ -30,4 +23,9 @@ class Place extends Model
{
return $this->posts()->count();
}
public function statuses()
{
return $this->hasMany(Status::class, 'id', 'place_id');
}
}

View file

@ -73,6 +73,8 @@ return [
'client' => 'predis',
'default' => [
'scheme' => env('REDIS_SCHEME', 'tcp'),
'path' => env('REDIS_PATH'),
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),

View file

@ -109,6 +109,8 @@ return [
'client' => 'predis',
'default' => [
'scheme' => env('REDIS_SCHEME', 'tcp'),
'path' => env('REDIS_PATH'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),