diff --git a/.gitignore b/.gitignore index b28e598f1..578705d20 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ .idea/ /vendor/ +/mariadb/ .DS_Store .AppleDouble .LSOverride +.env \ No newline at end of file diff --git a/README.md b/README.md index b44ec14b8..8782b7469 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # PHP_2024 +Test composer library + https://otus.ru/lessons/razrabotchik-php/?utm_source=github&utm_medium=free&utm_campaign=otus diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..c6a210ea0 --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "jack-frost/guess-number": "^1.0" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 000000000..b059d3ad2 --- /dev/null +++ b/composer.lock @@ -0,0 +1,50 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "83199422721130b13595482094759e57", + "packages": [ + { + "name": "jack-frost/guess-number", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/JackFrost/guess-number.git", + "reference": "122c5ba6d14b181aa7b8461dea7cb859ed1e116c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JackFrost/guess-number/zipball/122c5ba6d14b181aa7b8461dea7cb859ed1e116c", + "reference": "122c5ba6d14b181aa7b8461dea7cb859ed1e116c", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "JackFrost\\GuessNumber\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "description": "Guess number", + "support": { + "issues": "https://github.com/JackFrost/guess-number/issues", + "source": "https://github.com/JackFrost/guess-number/tree/v1.0.4" + }, + "time": "2024-02-17T06:19:54+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.2.0" +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..1dd60d45c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: "3" + +services: + + composer-app: + build: + context: ./docker/php + dockerfile: Dockerfile + image: composer-app + container_name: composer-app + restart: always + volumes: + - ./:/data/ diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile new file mode 100644 index 000000000..a58333c69 --- /dev/null +++ b/docker/php/Dockerfile @@ -0,0 +1,15 @@ +FROM php:7.0-fpm-alpine + +RUN apk add --no-cache \ + zip \ + unzip \ + git + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \ + chmod +x /usr/local/bin/composer + +WORKDIR /data + +VOLUME /data + +CMD ["php-fpm"] \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 000000000..0b36716e2 --- /dev/null +++ b/index.php @@ -0,0 +1,11 @@ +check(5);