Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRazumov/hw3 #75

Open
wants to merge 4 commits into
base: LRazumov/main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.idea/
/vendor/
/mariadb/
.DS_Store
.AppleDouble
.LSOverride
.env
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# PHP_2024

Test composer library

https://otus.ru/lessons/razrabotchik-php/?utm_source=github&utm_medium=free&utm_campaign=otus
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"jack-frost/guess-number": "^1.0"
}
}
47 changes: 47 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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/
15 changes: 15 additions & 0 deletions docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM php:8.2-fpm

RUN apt-get update && apt-get install -y \
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"]
11 changes: 11 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

use JackFrost\GuessNumber\GuessNumber;

$game = new GuessNumber();

echo $game->check(5);
Loading