This commit is contained in:
rendygaafk 2025-06-17 10:09:06 +07:00
commit cc89aa139c
8 changed files with 11 additions and 13 deletions

View File

@ -50,7 +50,7 @@ jobs:
- name: Build assets - name: Build assets
run: npm run build run: npm run build
- name: Run migrations - name: Run migration
env: env:
DB_HOST: 127.0.0.1 DB_HOST: 127.0.0.1
DB_PORT: 3306 DB_PORT: 3306

View File

@ -4,26 +4,24 @@ WORKDIR /app
COPY . . COPY . .
RUN apk add --no-cache nodejs npm
RUN composer install --no-dev --optimize-autoloader RUN composer install --no-dev --optimize-autoloader
RUN npm ci && npm run build RUN npm ci && npm run build
FROM php:8.2-fpm FROM php:8.2-fpm
WORKDIR /var/www
RUN apt-get update && apt-get install -y curl unzip git \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY --from=build /app /var/www COPY --from=build /app /var/www
RUN apt-get update && apt-get install -y \ RUN apt update && apt install -y libpng-dev libonig-dev libxml2-dev zip unzip git curl
libzip-dev \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libonig-dev \
libxml2-dev \
zip \
git \
unzip
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
COPY --from=build /app /var/www RUN chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache \
&& chmod -R 775 /var/www/storage /var/www/bootstrap/cache
CMD ["php-fpm"] CMD ["php-fpm"]