crecte dockerfile
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s

This commit is contained in:
eko
2026-03-16 04:20:00 +07:00
parent f26d4d63d2
commit 37b879948c
11 changed files with 76 additions and 7 deletions

View File

@@ -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

49
Dockerfile Normal file
View File

@@ -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"]

View File

@@ -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);
// });
}
}

0
bootstrap/cache/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/cache/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/cache/data/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/sessions/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/testing/.gitignore vendored Normal file → Executable file
View File

0
storage/logs/.gitignore vendored Normal file → Executable file
View File