intial commit

This commit is contained in:
2026-06-07 19:10:00 +07:00
commit 37bf240d23
230 changed files with 37141 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
FROM node:16-alpine AS node-builder
WORKDIR /build
COPY package.json package-lock.json tailwind.config.js webpack.mix.js ./
RUN npm install
COPY resources/ resources/
RUN npm run production
FROM php:8.1-fpm-alpine
RUN apk add --no-cache \
git unzip libpng libwebp libjpeg libxpm libxml2 \
&& docker-php-ext-install bcmath gd mbstring pdo_mysql xml
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /var/www
COPY . .
COPY --from=node-builder /build/public/css /var/www/public/css
COPY --from=node-builder /build/public/js /var/www/public/js
COPY --from=node-builder /build/public/mix-manifest.json /var/www/public/mix-manifest.json
RUN composer install --no-dev --optimize-autoloader && \
chmod -R 775 storage bootstrap/cache && \
chown -R www-data:www-data storage bootstrap/cache public/img
COPY .docker/php/entrypoint.sh /entrypoint.sh
COPY .docker/php/php.ini /usr/local/etc/php/conf.d/custom.ini
RUN chmod +x /entrypoint.sh
EXPOSE 9000
ENTRYPOINT ["/entrypoint.sh"]
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
set -e
echo "Waiting for database connection..."
until php -r "try { new PDO('mysql:host=${DB_HOST};port=${DB_PORT}', '${DB_USERNAME}', '${DB_PASSWORD}'); echo 'ok'; } catch(PDOException \$e) { echo \$e->getMessage(); exit(1); }" 2>/dev/null | grep -q 'ok'; do
sleep 3
done
echo "Database connected."
php artisan migrate --force --isolated
php artisan storage:link --force || true
if [ "${APP_ENV}" = "production" ]; then
php artisan config:cache
php artisan route:cache
php artisan view:cache
fi
exec php-fpm
+4
View File
@@ -0,0 +1,4 @@
upload_max_filesize = 20M
post_max_size = 20M
memory_limit = 256M
max_execution_time = 300