mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:04:02 +00:00
fix path prefixing
This commit is contained in:
parent
49ebb75f00
commit
5026f54a6d
6 changed files with 23 additions and 3 deletions
|
|
@ -9,3 +9,16 @@ StyleCI will flag code style violations in your pull requests.
|
|||
Run `docker-compose up -d` to start the containers. Then run `./test` to run the tests.
|
||||
|
||||
When you're done testing, run `docker-compose down` to shut down the containers.
|
||||
|
||||
### Docker on M1
|
||||
|
||||
You can add:
|
||||
```yaml
|
||||
services:
|
||||
mysql:
|
||||
platform: linux/amd64
|
||||
mysql2:
|
||||
platform: linux/amd64
|
||||
```
|
||||
|
||||
to `docker-compose.override.yml` to make `docker-compose up-d` work on M1.
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
|
|||
# && if [ "${PHP_VERSION}" = "7.4" ]; then docker-php-ext-configure gd --with-freetype --with-jpeg; else docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/; fi \
|
||||
&& docker-php-ext-install -j$(nproc) gd pdo pdo_mysql pdo_pgsql pdo_sqlite pgsql zip gmp bcmath pcntl ldap sysvmsg exif \
|
||||
# install the redis php extension
|
||||
&& pecl install redis-5.3.2 \
|
||||
&& pecl install redis-5.3.7 \
|
||||
&& docker-php-ext-enable redis \
|
||||
# install the pcov extention
|
||||
&& pecl install pcov \
|
||||
|
|
|
|||
5
docker-compose.override.yml
Normal file
5
docker-compose.override.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
services:
|
||||
mysql:
|
||||
platform: linux/amd64
|
||||
mysql2:
|
||||
platform: linux/amd64
|
||||
|
|
@ -67,7 +67,9 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
|
|||
);
|
||||
|
||||
if (! $finalPrefix) {
|
||||
$finalPrefix = $originalRoot . '/'. $suffix;
|
||||
$finalPrefix = $originalRoot
|
||||
? $originalRoot . '/'. $suffix
|
||||
: $suffix;
|
||||
}
|
||||
|
||||
$this->app['config']["filesystems.disks.{$disk}.root"] = $finalPrefix;
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ class BootstrapperTest extends TestCase
|
|||
// Check that disk prefixes respect the root_override logic
|
||||
$this->assertSame($expected_storage_path . '/app/', $this->getDiskPrefix('local'));
|
||||
$this->assertSame($expected_storage_path . '/app/public/', $this->getDiskPrefix('public'));
|
||||
$this->assertSame('tenant' . tenant('id') . '/', ltrim($this->getDiskPrefix('s3'), '/'));
|
||||
$this->assertSame('tenant' . tenant('id') . '/', $this->getDiskPrefix('s3'), '/');
|
||||
|
||||
// Check suffixing logic
|
||||
$new_storage_path = storage_path();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue