mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-02 06:43:10 +08:00
Updated dev-docker setup to not alter phpunit.xml
Tested on my machine via fresh dev instance with tests passing. May need old users to drop their old volume data.
This commit is contained in:
@ -3,14 +3,21 @@ FROM php:7.4-apache
|
||||
ENV APACHE_DOCUMENT_ROOT /app/public
|
||||
WORKDIR /app
|
||||
|
||||
# Install additional dependacnies and configure apache
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y git zip unzip libpng-dev libldap2-dev wait-for-it \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \
|
||||
&& docker-php-ext-install pdo_mysql gd ldap \
|
||||
&& a2enmod rewrite \
|
||||
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
|
||||
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
|
||||
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
|
||||
|
||||
# Install composer
|
||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||
&& php composer-setup.php \
|
||||
&& mv composer.phar /usr/bin/composer \
|
||||
&& php -r "unlink('composer-setup.php');"
|
||||
|
||||
# Use the default production configuration and update it as required
|
||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
|
||||
&& sed -i 's/memory_limit = 128M/memory_limit = 512M/g' "$PHP_INI_DIR/php.ini"
|
@ -10,7 +10,6 @@ else
|
||||
composer install
|
||||
wait-for-it db:3306 -t 45
|
||||
php artisan migrate --database=mysql
|
||||
php artisan migrate --database=mysql_testing
|
||||
chown -R www-data:www-data storage
|
||||
exec apache2-foreground
|
||||
fi
|
||||
|
Reference in New Issue
Block a user