diff --git a/.gitignore b/.gitignore index 2a7fb730..e3bcd671 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ vendor/ .env data/database.sqlite docs/swagger-ui +docker-compose.override.yml diff --git a/composer.json b/composer.json index faab4cb7..226419e7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "^5.6 || ^7.0", + "php": "^7.0", "roave/security-advisories": "dev-master", "zendframework/zend-expressive": "^2.0", "zendframework/zend-expressive-fastroute": "^2.0", @@ -39,11 +39,12 @@ "theorchard/monolog-cascade": "^0.4", "endroid/qrcode": "^1.7", "mikehaertl/phpwkhtmltopdf": "^2.2", - "doctrine/migrations": "^1.4" + "doctrine/migrations": "^1.4", + "http-interop/http-middleware": "^0.4.1" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.0", - "squizlabs/php_codesniffer": "^2.3", + "squizlabs/php_codesniffer": "^3.1", "filp/whoops": "^2.0", "symfony/var-dumper": "^3.0", "vlucas/phpdotenv": "^2.2", diff --git a/data/infra/php.Dockerfile b/data/infra/php.Dockerfile index 28d9d6f3..fac0b498 100644 --- a/data/infra/php.Dockerfile +++ b/data/infra/php.Dockerfile @@ -26,7 +26,7 @@ RUN apk add --no-cache --virtual libpng-dev RUN docker-php-ext-install gd # Install redis extension -ADD https://github.com/phpredis/phpredis/archive/php7.tar.gz /tmp/phpredis.tar.gz +ADD https://github.com/phpredis/phpredis/archive/3.1.4.tar.gz /tmp/phpredis.tar.gz RUN mkdir -p /usr/src/php/ext/redis\ && tar xf /tmp/phpredis.tar.gz -C /usr/src/php/ext/redis --strip-components=1 # configure and install @@ -85,3 +85,6 @@ RUN rm /tmp/xdebug.tar.gz RUN php -r "readfile('https://getcomposer.org/installer');" | php RUN chmod +x composer.phar RUN mv composer.phar /usr/local/bin/composer + +# Make home directory writable by anyone +RUN chmod 777 /home diff --git a/docker-compose.override.yml.dist b/docker-compose.override.yml.dist new file mode 100644 index 00000000..b347b9e8 --- /dev/null +++ b/docker-compose.override.yml.dist @@ -0,0 +1,8 @@ +version: '2' + +services: + shlink_php: + user: 1000:1000 + volumes: + - /etc/passwd:/etc/passwd:ro + - /etc/group:/etc/group:ro