diff --git a/.docker/init.sh b/.docker/init.sh index fd2e10a..9aa3952 100644 --- a/.docker/init.sh +++ b/.docker/init.sh @@ -10,6 +10,11 @@ chown nginx:nginx /run/nginx sed -i "s/^nobody:.*$/nobody:x:1000:50::nobody:\/:\/sbin\/nologin/" /etc/passwd sed -i "s/^nobody:.*$/nobody:x:50:/" /etc/group +# Prepare ulogger filesystem +grep '^[$ /var/www/html/config.php +chown nobody:nobody /var/www/html/uploads +chmod 775 /var/www/html/uploads + if [ "$ULOGGER_DB_DRIVER" = "sqlite" ]; then sed -i "s/^\$dbuser = .*$//" /var/www/html/config.php sed -i "s/^\$dbpass = .*$//" /var/www/html/config.php diff --git a/.travis.yml b/.travis.yml index d3db1f0..90c1ab4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,9 +57,11 @@ after_success: tx push -s --no-interactive fi +after_failure: + - docker logs ulogger script: - - ./vendor/bin/phpunit -c .tests/phpunit.xml || docker logs ulogger + - ./vendor/bin/phpunit -c .tests/phpunit.xml - npm test addons: diff --git a/Dockerfile b/Dockerfile index d33ae33..47ee91f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,6 @@ RUN chown nginx.nginx /etc/nginx/conf.d/default.conf RUN rm -rf /var/www/html RUN mkdir -p /var/www/html COPY . /var/www/html -RUN grep '^[$ /var/www/html/config.php RUN /init.sh "${DB_ROOT_PASS}" "${DB_USER_PASS}"