diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4a1cbd6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM php:7.1-cli + +RUN apt-get update +RUN apt-get install -y unzip + +RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +RUN php composer-setup.php +RUN php -r "unlink('composer-setup.php');" +RUN mv composer.phar /usr/local/bin/composer + +WORKDIR /app + +COPY . . + +RUN composer update --prefer-source --no-interaction + diff --git a/composer.json b/composer.json index ae586b7..99c3fbd 100755 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "require": { "php": ">=7.1.0", - "predis/predis": "1.1.x-dev#157f658f0be5f48cb2aaa4b6a6ac753c1168f465" + "predis/predis": "1.1.10" }, "bin": [ "php-rq-run-tests" diff --git a/docker-compose.test.yaml b/docker-compose.test.yaml new file mode 100644 index 0000000..238c574 --- /dev/null +++ b/docker-compose.test.yaml @@ -0,0 +1,20 @@ +version: '3' +services: + php-rq: + build: + context: . + dockerfile: Dockerfile + entrypoint: '' + command: sh -c 'php php-rq-run-tests' + volumes: + - ./:/app + environment: + REDIS_HOST: redis + REDIS_DB: 0 + REDIS_PORT: 6379 + REDIS_PASSWORD: + depends_on: + - redis + + redis: + image: redis:7.0.8-alpine