Add Docker one-click deploy and data migration docs.
Enable PHP 8.2 + Apache compose stack with persistent data/uploads volumes and PhpSpreadsheet for xlsx import/export. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
FROM php:8.2-apache
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libzip-dev \
|
||||
libxml2-dev \
|
||||
unzip \
|
||||
git \
|
||||
&& docker-php-ext-install pdo_sqlite zip \
|
||||
&& a2enmod rewrite headers \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY docker/apache-vhost.conf /etc/apache2/sites-available/000-default.conf
|
||||
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
|
||||
COPY composer.json ./
|
||||
RUN composer install --no-dev --prefer-dist --no-interaction --optimize-autoloader
|
||||
|
||||
COPY app ./app
|
||||
COPY public ./public
|
||||
COPY data ./data
|
||||
COPY uploads ./uploads
|
||||
|
||||
RUN chown -R www-data:www-data /var/www/html/data /var/www/html/uploads \
|
||||
&& chmod -R 775 /var/www/html/data /var/www/html/uploads
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
Reference in New Issue
Block a user