Fix permissions in docker

This commit is contained in:
Bartek Fabiszewski 2020-01-08 09:42:28 +01:00
parent 4072191170
commit 66c5cc915f
3 changed files with 8 additions and 2 deletions

View File

@ -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.default.php > /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

View File

@ -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:

View File

@ -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.default.php > /var/www/html/config.php
RUN /init.sh "${DB_ROOT_PASS}" "${DB_USER_PASS}"