- Added main application entry point (app.jsx) and bootstrap file for React setup. - Created Wiki index page (Index.jsx) for documentation and file management. - Implemented utility functions for formatting and status handling in utils.js. - Set up Blade template (app.blade.php) for Inertia.js integration. - Defined API routes for metrics and terminal access in api.php. - Established console commands for scheduled tasks in console.php. - Created web routes for various application features including authentication, hypervisors, containers, cloud accounts, security, backups, and wiki management in web.php. - Developed setup scripts for Windows (setup.ps1) and Linux (setup.sh) environments. - Configured Tailwind CSS for styling with custom themes and animations in tailwind.config.js. - Set up Vite for asset bundling and development server in vite.config.js.
93 lines
2.0 KiB
Docker
93 lines
2.0 KiB
Docker
FROM php:8.3-fpm-alpine
|
|
|
|
LABEL maintainer="Infra Manager"
|
|
|
|
# Build arguments
|
|
ARG NODE_VERSION=22
|
|
ARG USER_ID=1000
|
|
ARG GROUP_ID=1000
|
|
|
|
# Install system dependencies
|
|
RUN apk add --no-cache \
|
|
bash \
|
|
curl \
|
|
git \
|
|
icu-dev \
|
|
libzip-dev \
|
|
linux-headers \
|
|
oniguruma-dev \
|
|
openssl-dev \
|
|
sqlite \
|
|
sqlite-dev \
|
|
supervisor \
|
|
unzip \
|
|
zip \
|
|
libpng-dev \
|
|
libjpeg-turbo-dev \
|
|
freetype-dev \
|
|
shadow \
|
|
nodejs \
|
|
npm
|
|
|
|
# Install PHP extensions
|
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
|
&& docker-php-ext-install \
|
|
bcmath \
|
|
exif \
|
|
gd \
|
|
intl \
|
|
mbstring \
|
|
opcache \
|
|
pcntl \
|
|
pdo \
|
|
pdo_sqlite \
|
|
zip
|
|
|
|
# Install pdo_mysql for later MySQL migration
|
|
RUN apk add --no-cache mysql-client \
|
|
&& docker-php-ext-install pdo_mysql
|
|
|
|
# Install Redis extension
|
|
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
|
|
&& pecl install redis \
|
|
&& docker-php-ext-enable redis \
|
|
&& apk del .build-deps
|
|
|
|
# Install Composer
|
|
COPY --from=composer:2.7 /usr/bin/composer /usr/bin/composer
|
|
|
|
# Configure opcache
|
|
RUN docker-php-ext-enable opcache
|
|
COPY docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
|
|
|
# PHP configuration
|
|
COPY docker/php/php.ini /usr/local/etc/php/conf.d/custom.ini
|
|
|
|
# Create application user
|
|
RUN addgroup -g ${GROUP_ID} appgroup 2>/dev/null || true \
|
|
&& adduser -u ${USER_ID} -G appgroup -s /bin/bash -D appuser 2>/dev/null || true
|
|
|
|
# Set working directory
|
|
WORKDIR /var/www/html
|
|
|
|
# Copy application
|
|
COPY --chown=appuser:appgroup . .
|
|
|
|
# Install PHP dependencies
|
|
RUN composer install --no-dev --optimize-autoloader --no-interaction 2>/dev/null || \
|
|
composer install --optimize-autoloader --no-interaction
|
|
|
|
# Install Node dependencies and build assets
|
|
RUN npm ci && npm run build
|
|
|
|
# Set permissions
|
|
RUN chown -R appuser:appgroup /var/www/html \
|
|
&& chmod -R 755 /var/www/html/storage \
|
|
&& chmod -R 755 /var/www/html/bootstrap/cache
|
|
|
|
USER appuser
|
|
|
|
EXPOSE 9000
|
|
|
|
CMD ["php-fpm"]
|