NOW MANAGED ON CODEBERG
Updated dev-docker setup to not alter phpunit.xml
Dan Brown43c2fc3c3780
diff --git a/app/Config/database.php b/app/Config/database.phpindex 6e7cf529c..170666ddb 100644--- a/app/Config/database.php+++ b/app/Config/database.php@@ -81,7 +81,7 @@ return ['mysql_testing' => ['driver' => 'mysql','url' => env('TEST_DATABASE_URL'),- 'host' => $mysql_host,+ 'host' => '127.0.0.1','database' => 'bookstack-test','username' => env('MYSQL_USER', 'bookstack-test'),'password' => env('MYSQL_PASSWORD', 'bookstack-test'),diff --git a/dev/docker/Dockerfile b/dev/docker/Dockerfileindex b55ec9e0a..895ad595a 100644--- a/dev/docker/Dockerfile+++ b/dev/docker/Dockerfile@@ -3,14 +3,21 @@ FROM php:7.4-apacheENV APACHE_DOCUMENT_ROOT /app/publicWORKDIR /app+# Install additional dependacnies and configure apacheRUN 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"\ No newline at end of filediff --git a/dev/docker/entrypoint.app.sh b/dev/docker/entrypoint.app.shindex 9709139ab..e91d34a71 100755--- a/dev/docker/entrypoint.app.sh+++ b/dev/docker/entrypoint.app.sh@@ -10,7 +10,6 @@ elsecomposer installwait-for-it db:3306 -t 45php artisan migrate --database=mysql- php artisan migrate --database=mysql_testingchown -R www-data:www-data storageexec apache2-foregroundfidiff --git a/docker-compose.yml b/docker-compose.ymlindex 037c5f67e..792025894 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -23,12 +23,14 @@ services:context: .dockerfile: ./dev/docker/Dockerfileenvironment:+ APP_URL: http://localhost:${DEV_PORT:-8080}DB_CONNECTION: mysqlDB_HOST: dbDB_PORT: 3306DB_DATABASE: bookstack-devDB_USERNAME: bookstack-testDB_PASSWORD: bookstack-test+ TEST_DATABASE_URL: mysql://bookstack-test:bookstack-test@db/bookstack-testMAIL_DRIVER: smtpMAIL_HOST: mailhogMAIL_PORT: 1025diff --git a/readme.md b/readme.mdindex a039b108c..eb98ae6d4 100644--- a/readme.md+++ b/readme.md@@ -102,7 +102,7 @@ If all the conditions are met, you can proceed with the following steps:If needed, You'll be able to run any artisan commands via docker-compose like so:-```shell script+```bashdocker-compose run app php artisan list```@@ -110,16 +110,20 @@ The docker-compose setup runs an instance of [MailHog](https://github.com/mailho#### Running tests-After starting the general development Docker, seed the testing database:- ```shell script-# this is to be done only once+After starting the general development Docker, migrate & seed the testing database:++ ```bash+# This only needs to be done once+docker-compose run app php artisan migrate --database=mysql_testingdocker-compose run app php artisan db:seed --class=DummyContentSeeder --database=mysql_testing```-Once the database has been seeded, you can run the tests by:- ```shell script+Once the database has been migrated & seeded, you can run the tests like so:++ ```bashdocker-compose run app php vendor/bin/phpunit```+## 🌎 TranslationsTranslations for text within BookStack is managed through the [BookStack project on Crowdin](https://crowdin.com/project/bookstack). Some strings have colon-prefixed variables in such as `:userName`. Leave these values as they are as they will be replaced at run-time. Crowdin is the preferred way to provide translations, otherwise the raw translations files can be found within the `resources/lang` path.