From 81e528fe4392e460282f27215942d1c982528759 Mon Sep 17 00:00:00 2001 From: Ilya Rogozhin Date: Tue, 9 Jun 2026 19:28:32 +0200 Subject: [PATCH] Polist Readme instructions --- compose.yaml | 1 + images/mysql/Dockerfile | 2 ++ images/mysql/init.sql | 2 ++ main-repo/README.md | 27 +++++++++++++++++---------- main-repo/supervisord.pid | 1 - 5 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 images/mysql/init.sql delete mode 100644 main-repo/supervisord.pid diff --git a/compose.yaml b/compose.yaml index 7c2cb18..3aeff5a 100644 --- a/compose.yaml +++ b/compose.yaml @@ -38,6 +38,7 @@ services: - ./logs/mysql:/var/log/mysql environment: MYSQL_ROOT_PASSWORD: secret + MYSQL_DATABASE: test_fhr security_opt: - seccomp:unconfined redis: diff --git a/images/mysql/Dockerfile b/images/mysql/Dockerfile index b827109..fbf1df2 100644 --- a/images/mysql/Dockerfile +++ b/images/mysql/Dockerfile @@ -1,3 +1,5 @@ FROM mysql:latest COPY ./my.cnf /etc/mysql/my.cnf + +#COPY ./init.sql /docker-entrypoint-initdb.d/ diff --git a/images/mysql/init.sql b/images/mysql/init.sql new file mode 100644 index 0000000..8ee4820 --- /dev/null +++ b/images/mysql/init.sql @@ -0,0 +1,2 @@ +CREATE DATABASE IF NOT EXISTS `test_fhr` CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + \ No newline at end of file diff --git a/main-repo/README.md b/main-repo/README.md index a463b84..34738d4 100644 --- a/main-repo/README.md +++ b/main-repo/README.md @@ -16,14 +16,6 @@ For Linux env: -```bash -mkdir ilya_test -cd ilya_test -git clone https://gitea.wired-mind.ru/ijin82/test-FHR.git . -cp main-repo/.env.example main-repo/.env -docker compose up -``` - Алиасы для комфортного подключения `vim ~/.bashrc` ```bash ### Test FHR @@ -33,6 +25,23 @@ alias fhr-redis='docker exec -it redis_fhr /bin/sh' alias fhr-php='docker exec -u www-data:www-data -it php8_fhr /bin/bash' ``` +```bash +mkdir ilya_test +cd ilya_test +git clone https://gitea.wired-mind.ru/ijin82/test-FHR.git . +cp main-repo/.env.example main-repo/.env +docker compose up +``` + +Установка компонент и миграции +```bash +fhr-php + +composer i +php artisan migrate +``` + + ### Написать сортировку для массива числовых данных от 200 тысяч элементов Запуск теста @@ -56,8 +65,6 @@ php artisan app:test-fhr-sort ```bash fhr-php -php artisan migrate # Структура БД - # Клубы php artisan db:seed --class=ClubSeeder # Игроки diff --git a/main-repo/supervisord.pid b/main-repo/supervisord.pid deleted file mode 100644 index d00491f..0000000 --- a/main-repo/supervisord.pid +++ /dev/null @@ -1 +0,0 @@ -1