Publish Livewire assets in Docker build
This commit is contained in:
@@ -100,6 +100,8 @@ COPY . .
|
||||
COPY --from=vendor /var/www/html/vendor ./vendor
|
||||
COPY --from=node_builder /var/www/html/public/build ./public/build
|
||||
|
||||
RUN php artisan vendor:publish --tag=livewire:assets --force --no-interaction
|
||||
|
||||
RUN php artisan config:clear \
|
||||
&& php artisan config:cache \
|
||||
&& php artisan route:clear \
|
||||
|
||||
19
tests/Unit/LivewireAssetsPublishingTest.php
Normal file
19
tests/Unit/LivewireAssetsPublishingTest.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class LivewireAssetsPublishingTest extends TestCase
|
||||
{
|
||||
public function test_dockerfile_publishes_livewire_assets(): void
|
||||
{
|
||||
$dockerfile = file_get_contents(base_path('Dockerfile'));
|
||||
|
||||
$this->assertNotFalse($dockerfile);
|
||||
$this->assertStringContainsString(
|
||||
'vendor:publish --tag=livewire:assets',
|
||||
$dockerfile
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user