specify DB in docker env

This commit is contained in:
Shish 2019-02-02 12:06:21 +00:00
parent eb24fa0b21
commit 0aec16aa5b
2 changed files with 4 additions and 1 deletions

View file

@ -17,4 +17,4 @@ RUN mkdir -p data/config && \
php index.php && \
./vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-text && \
rm -rf data
CMD ["/usr/bin/php", "-d", "upload_max_filesize=50M", "-d", "post_max_size=50M", "-S", "0.0.0.0:8000", "tests/router.php"]
CMD "/app/tests/docker-init.sh"

3
tests/docker-init.sh Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
echo "<?php define(\"DATABASE_DSN\", \"${DB_DSN}\");" > data/config/auto_install.conf.php
/usr/bin/php -d upload_max_filesize=50M -d post_max_size=50M -S 0.0.0.0:8000 tests/router.php