mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Merge pull request #1603 from pixelfed/staging
Allow redis to be used over a UNIX socket
This commit is contained in:
commit
cb62ab4ecc
5 changed files with 12 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue