fix dockerfile
Some checks failed
Build, Push and Deploy / build-and-push (push) Failing after 1m52s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
Build, Push and Deploy / deploy-staging (push) Has been skipped
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
Some checks failed
Build, Push and Deploy / build-and-push (push) Failing after 1m52s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
Build, Push and Deploy / deploy-staging (push) Has been skipped
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
This commit is contained in:
@@ -25,7 +25,6 @@ jobs:
|
|||||||
- run: head -n 5 app/Helpers/Helper.php
|
- run: head -n 5 app/Helpers/Helper.php
|
||||||
- run: ls -la app/Helpers/Helper.php
|
- run: ls -la app/Helpers/Helper.php
|
||||||
- run: file app/Helpers/Helper.php
|
- run: file app/Helpers/Helper.php
|
||||||
- run: nl -ba app/Helpers/Helper.php | head -10
|
|
||||||
- run: pwd
|
- run: pwd
|
||||||
- run: whoami
|
- run: whoami
|
||||||
|
|
||||||
|
|||||||
26
Dockerfile
26
Dockerfile
@@ -33,7 +33,24 @@ WORKDIR /var/www/html
|
|||||||
# Copy composer files first
|
# Copy composer files first
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
|
|
||||||
# Install PHP dependencies (remove --no-scripts flag)
|
# Create missing Helper.php file before composer install
|
||||||
|
RUN mkdir -p app/Helpers && \
|
||||||
|
cat > app/Helpers/Helper.php << 'EOF'
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Helpers;
|
||||||
|
|
||||||
|
class Helper
|
||||||
|
{
|
||||||
|
// Add your helper functions here
|
||||||
|
public static function example()
|
||||||
|
{
|
||||||
|
return "Helper loaded";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Install PHP dependencies
|
||||||
RUN composer install --no-interaction --no-progress --optimize-autoloader
|
RUN composer install --no-interaction --no-progress --optimize-autoloader
|
||||||
|
|
||||||
# Copy package files for NPM
|
# Copy package files for NPM
|
||||||
@@ -43,7 +60,7 @@ COPY vite.config.js ./
|
|||||||
# Install NPM dependencies
|
# Install NPM dependencies
|
||||||
RUN npm install --legacy-peer-deps --no-audit
|
RUN npm install --legacy-peer-deps --no-audit
|
||||||
|
|
||||||
# Copy application files
|
# Copy application files (this will overwrite the placeholder Helper.php if exists)
|
||||||
COPY --chown=www-data:www-data . .
|
COPY --chown=www-data:www-data . .
|
||||||
|
|
||||||
# Remove any nested vendor directories to avoid conflicts
|
# Remove any nested vendor directories to avoid conflicts
|
||||||
@@ -59,15 +76,12 @@ RUN mkdir -p storage/framework/{cache,sessions,views} \
|
|||||||
# Build Vite assets
|
# Build Vite assets
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Run package discovery and other post-install commands
|
# Run package discovery
|
||||||
RUN php artisan package:discover --ansi || true
|
RUN php artisan package:discover --ansi || true
|
||||||
|
|
||||||
# Generate application key
|
# Generate application key
|
||||||
RUN php artisan key:generate --no-interaction --force || true
|
RUN php artisan key:generate --no-interaction --force || true
|
||||||
|
|
||||||
# Cache configurations for production
|
|
||||||
RUN php artisan config:cache || true
|
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user