diff --git a/.camel-jbang/camel-jbang-run.properties b/.camel-jbang/camel-jbang-run.properties new file mode 100644 index 0000000..975a9d8 --- /dev/null +++ b/.camel-jbang/camel-jbang-run.properties @@ -0,0 +1,20 @@ +camel.main.modeline=true +camel.jbang.ignoreLoadingError=true +camel.jbang.lazyBean=true +camel.jbang.compileWorkDir=.camel-jbang/compile +camel.jbang.health=false +camel.jbang.metrics=false +camel.jbang.console=false +camel.jbang.verbose=false +camel.jbang.camel-version=4.18.0 +camel.jbang.springBootVersion=3.5.10 +camel.jbang.quarkusVersion=3.31.3 +camel.jbang.quarkusGroupId=io.quarkus.platform +camel.jbang.quarkusArtifactId=quarkus-bom +camel.jbang.kameletsVersion=4.17.0 +camel.main.routesIncludePattern=file\:/home/eko/.vscode/extensions/redhat.vscode-camelk-0.0.41/resources/simple-java-file/UsedToWarmupDependenciesDownload.java +dependency=mvn\:org.apache.camel\:camel-kamelet\:4.18.0 +dependency=mvn\:org.apache.camel.kamelets\:camel-kamelets\:4.17.0 +dependency=mvn\:org.apache.camel\:camel-java-joor-dsl\:4.18.0 +dependency=mvn\:org.apache.camel\:camel-endpointdsl\:4.18.0 +dependency=mvn\:org.apache.camel\:camel-timer\:4.18.0 diff --git a/.camel-jbang/compile/UsedToWarmupDependenciesDownload.class b/.camel-jbang/compile/UsedToWarmupDependenciesDownload.class new file mode 100644 index 0000000..c7b9129 Binary files /dev/null and b/.camel-jbang/compile/UsedToWarmupDependenciesDownload.class differ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..38b30d0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,49 @@ +FROM php:8.2-fpm-alpine + +# Install PostgreSQL extensions +RUN apk add --no-cache \ + libzip-dev \ + postgresql-dev \ + && docker-php-ext-install -j$(nproc) \ + pdo_pgsql \ + pgsql \ + opcache \ + zip \ + && docker-php-ext-enable \ + pdo_pgsql \ + pgsql \ + opcache \ + zip + +WORKDIR /var/www/html + +# Copy application files +COPY --chown=www-data:www-data . . + +# Create all necessary directories with proper permissions +RUN mkdir -p storage/framework/{cache,sessions,views} \ + && mkdir -p storage/logs \ + && mkdir -p bootstrap/cache \ + && chown -R www-data:www-data storage bootstrap/cache \ + && chmod -R 775 storage bootstrap/cache \ + && chmod 777 storage/framework/sessions \ + && chmod 777 storage/logs + +# Create startup script to handle different modes +RUN echo '#!/bin/sh' > /start.sh && \ + echo 'if [ "$MODE" = "dev" ]; then' >> /start.sh && \ + echo ' echo "Starting in DEV mode with PHP built-in server on port 8000..."' >> /start.sh && \ + echo ' php artisan serve --host=0.0.0.0 --port=8000' >> /start.sh && \ + echo 'else' >> /start.sh && \ + echo ' echo "Starting in PROD mode with PHP-FPM on port 9000..."' >> /start.sh && \ + echo ' php-fpm' >> /start.sh && \ + echo 'fi' >> /start.sh && \ + chmod +x /start.sh + +# Verify permissions (for debugging) +RUN ls -la storage/framework/ + +EXPOSE 8000 9000 + +# Use the startup script +CMD ["/start.sh"] \ No newline at end of file diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index fdc2841..cb9b6bd 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -21,14 +21,14 @@ public function register(): void */ public function boot(): void { - Schema::defaultStringLength(191); + // Schema::defaultStringLength(191); - Blade::if('usercan', function ($permission) { - return auth()->check() && auth()->user()->hasPermission($permission); - }); + // Blade::if('usercan', function ($permission) { + // return auth()->check() && auth()->user()->hasPermission($permission); + // }); - Blade::if('usercanany', function ($permissions) { - return auth()->check() && auth()->user()->hasAnyPermission($permissions); - }); + // Blade::if('usercanany', function ($permissions) { + // return auth()->check() && auth()->user()->hasAnyPermission($permissions); + // }); } } diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore old mode 100644 new mode 100755 diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore old mode 100644 new mode 100755 diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore old mode 100644 new mode 100755 diff --git a/storage/framework/cache/data/.gitignore b/storage/framework/cache/data/.gitignore old mode 100644 new mode 100755 diff --git a/storage/framework/sessions/.gitignore b/storage/framework/sessions/.gitignore old mode 100644 new mode 100755 diff --git a/storage/framework/testing/.gitignore b/storage/framework/testing/.gitignore old mode 100644 new mode 100755 diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore old mode 100644 new mode 100755