fix pipeline
Some checks failed
Build, Push and Deploy / build-and-deploy (push) Failing after 1m13s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s

This commit is contained in:
eko
2026-03-16 06:41:29 +07:00
parent 4caa46910a
commit 3f5cdcc558
2 changed files with 29 additions and 45 deletions

View File

@@ -1,9 +1,11 @@
FROM php:8.2-fpm-alpine
# Install PostgreSQL extensions
# Install dependencies
RUN apk add --no-cache \
libzip-dev \
postgresql-dev \
git \
curl \
&& docker-php-ext-install -j$(nproc) \
pdo_pgsql \
pgsql \
@@ -15,12 +17,21 @@ RUN apk add --no-cache \
opcache \
zip
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/html
# Copy composer files first (for better caching)
COPY composer.json composer.lock ./
# Install dependencies
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader
# Copy application files
COPY --chown=www-data:www-data . .
# Create all necessary directories with proper permissions
# Create necessary directories
RUN mkdir -p storage/framework/{cache,sessions,views} \
&& mkdir -p storage/logs \
&& mkdir -p bootstrap/cache \
@@ -29,7 +40,7 @@ RUN mkdir -p storage/framework/{cache,sessions,views} \
&& chmod 777 storage/framework/sessions \
&& chmod 777 storage/logs
# Create startup script to handle different modes
# Create startup script
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 && \
@@ -40,10 +51,6 @@ RUN echo '#!/bin/sh' > /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"]