mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 06:54:05 +00:00
Add docker
This commit is contained in:
parent
73c818f975
commit
87a207b70c
4 changed files with 12 additions and 10 deletions
|
|
@ -10,14 +10,14 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"illuminate/support": "5.7.*||5.8.*",
|
"illuminate/support": "5.8.*||5.7.*",
|
||||||
"webpatser/laravel-uuid": "^3.0",
|
"webpatser/laravel-uuid": "^3.0",
|
||||||
"predis/predis": "^1.1"
|
"predis/predis": "^1.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"vlucas/phpdotenv": "^2.2||^3.3",
|
"vlucas/phpdotenv": "^2.2||^3.3",
|
||||||
"psy/psysh": "@stable",
|
"psy/psysh": "@stable",
|
||||||
"laravel/framework": "5.7.*||5.8.*",
|
"laravel/framework": "5.8.*||5.7.*",
|
||||||
"orchestra/testbench": "~3.7||~3.8",
|
"orchestra/testbench": "~3.7||~3.8",
|
||||||
"league/flysystem-aws-s3-v3": "~1.0"
|
"league/flysystem-aws-s3-v3": "~1.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,12 @@ services:
|
||||||
- .:/var/www/html
|
- .:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
DOCKER: 1
|
DOCKER: 1
|
||||||
DB_PASSWORD: "password"
|
DB_PASSWORD: password
|
||||||
TENANCY_TEST_REDIS_HOST: "redis"
|
DB_USERNAME: root
|
||||||
TENANCY_TEST_MYSQL_HOST: "mysql"
|
DB_DATABASE: main
|
||||||
TENANCY_TEST_PGSQL_HOST: "postgres"
|
TENANCY_TEST_REDIS_HOST: redis
|
||||||
|
TENANCY_TEST_MYSQL_HOST: mysql
|
||||||
|
TENANCY_TEST_PGSQL_HOST: postgres
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
mysql:
|
mysql:
|
||||||
|
|
@ -31,7 +33,7 @@ services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:11
|
image: postgres:11
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: ""
|
POSTGRES_PASSWORD: password
|
||||||
POSTGRES_USER: user
|
POSTGRES_USER: user
|
||||||
POSTGRES_DB: main
|
POSTGRES_DB: main
|
||||||
redis:
|
redis:
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ namespace Stancl\Tenancy\Traits;
|
||||||
use Stancl\Tenancy\CacheManager;
|
use Stancl\Tenancy\CacheManager;
|
||||||
use Illuminate\Support\Facades\Redis;
|
use Illuminate\Support\Facades\Redis;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
|
||||||
use Stancl\Tenancy\Exceptions\PhpRedisNotInstalledException;
|
use Stancl\Tenancy\Exceptions\PhpRedisNotInstalledException;
|
||||||
|
|
||||||
trait BootstrapsTenancy
|
trait BootstrapsTenancy
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
|
|
||||||
$app['config']->set([
|
$app['config']->set([
|
||||||
'database.redis.client' => 'phpredis',
|
'database.redis.client' => 'phpredis',
|
||||||
|
'database.redis.cache.host' => env('TENANCY_TEST_REDIS_HOST', '127.0.0.1'),
|
||||||
'database.redis.default.host' => env('TENANCY_TEST_REDIS_HOST', '127.0.0.1'),
|
'database.redis.default.host' => env('TENANCY_TEST_REDIS_HOST', '127.0.0.1'),
|
||||||
'database.redis.tenancy' => [
|
'database.redis.tenancy' => [
|
||||||
'host' => env('TENANCY_TEST_REDIS_HOST', '127.0.0.1'),
|
'host' => env('TENANCY_TEST_REDIS_HOST', '127.0.0.1'),
|
||||||
|
|
@ -68,8 +69,8 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
'suffix' => '.sqlite',
|
'suffix' => '.sqlite',
|
||||||
],
|
],
|
||||||
'database.connections.sqlite.database' => ':memory:',
|
'database.connections.sqlite.database' => ':memory:',
|
||||||
'database.connections.mysql.host' => env('TENANCY_TESTING_MYSQL_HOST', '127.0.0.1'),
|
'database.connections.mysql.host' => env('TENANCY_TEST_MYSQL_HOST', '127.0.0.1'),
|
||||||
'database.connections.pgsql.host' => env('TENANCY_TESTING_PGSQL_HOST', '127.0.0.1'),
|
'database.connections.pgsql.host' => env('TENANCY_TEST_PGSQL_HOST', '127.0.0.1'),
|
||||||
'tenancy.filesystem.disks' => [
|
'tenancy.filesystem.disks' => [
|
||||||
'local',
|
'local',
|
||||||
'public',
|
'public',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue