From cecd510cffe51ae8e607d0233d6c0be2c6073097 Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Thu, 7 Dec 2023 13:53:45 +0300 Subject: [PATCH 1/3] added sqlite service docker --- .env.infra-example | 1 + Makefile | 11 +++++++---- phpdocker/php-fpm/Dockerfile | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.env.infra-example b/.env.infra-example index cf36eb3..d33c253 100644 --- a/.env.infra-example +++ b/.env.infra-example @@ -11,3 +11,4 @@ MYSQL_ROOT_PASSWORD="nhbnhb22" MYSQL_DATABASE="eatvio" MYSQL_USER="eatvio_user" MYSQL_PASSWORD="eatvio_pass_nhbnhb22" +MY_APP_GIT_URL="ssh://git@10.55.5.123:222/alex_chevski/eatvio.git" diff --git a/Makefile b/Makefile index 0df20fc..4bb9898 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -include .env +include .env.infra-example clone: - git clone ssh://git@10.55.5.123:222/eatvio/eatvio.git app + git clone ${MY_APP_GIT_URL} app compose-up: docker-compose up -d @@ -25,7 +25,10 @@ run-migrations: docker-compose exec php-fpm ./artisan migrate run-plan-seed: - docker-compose exec php-fpm ./artisan db:seed --class=PlanTablesSeeder + docker-compose exec php-fpm ./artisan db:seed --class=PlanSeeder + +run-user-seed: + docker-compose exec php-fpm ./artisan db:seed --class=UserSeeder seed-db: docker-compose exec php-fpm ./artisan db:seed @@ -54,4 +57,4 @@ make-storage-link: node-frontend-deps: docker-compose exec php-fpm npm i --legacy-peer-deps -init: clone copy-infra-env compose-down compose-up setup-laravel-packages copy-laravel-env setup-laravel-key run-migrations node-frontend-deps start-frontend-prod fix-permissions make-storage-link +init: clone compose-down compose-up setup-laravel-packages copy-laravel-env setup-laravel-key run-migrations node-frontend-deps start-frontend-prod fix-permissions make-storage-link diff --git a/phpdocker/php-fpm/Dockerfile b/phpdocker/php-fpm/Dockerfile index 7051d88..edaf199 100644 --- a/phpdocker/php-fpm/Dockerfile +++ b/phpdocker/php-fpm/Dockerfile @@ -1,16 +1,16 @@ FROM phpdockerio/php:8.2-fpm WORKDIR "/application" +RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - RUN apt-get update; \ apt-get -y --no-install-recommends install \ git \ php8.2-gd \ php8.2-mysql \ - php8.2-pgsql; \ + php8.2-sqlite3 \ + nodejs \ + php8.2-pgsql && npm install -g npm@10.1.0 \ apt-get clean; \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* -RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - -RUN apt-get update && apt-get install -y nodejs && npm install -g npm@10.1.0 - ENV PATH=node_modules/.bin:$PATH From bd46111895c5e60591ca9bf9665fb58755c5bece Mon Sep 17 00:00:00 2001 From: Anatoliy Poloz Date: Thu, 7 Dec 2023 14:08:30 +0300 Subject: [PATCH 2/3] status and tinker commands added --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 4bb9898..19d8b58 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,12 @@ compose-up: compose-down: docker-compose down --remove-orphans -v +status: + docker-compose ps + +tinker: + docker-compose exec php-fpm ./artisan tinker + setup-laravel-key: docker-compose exec php-fpm php /application/artisan key:generate From 25467b91ddb6a32da98cf19f2f233aa8592f98d0 Mon Sep 17 00:00:00 2001 From: Anatoliy Poloz Date: Thu, 7 Dec 2023 14:12:29 +0300 Subject: [PATCH 3/3] added new url --- .env.infra-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.infra-example b/.env.infra-example index d33c253..55c0279 100644 --- a/.env.infra-example +++ b/.env.infra-example @@ -11,4 +11,4 @@ MYSQL_ROOT_PASSWORD="nhbnhb22" MYSQL_DATABASE="eatvio" MYSQL_USER="eatvio_user" MYSQL_PASSWORD="eatvio_pass_nhbnhb22" -MY_APP_GIT_URL="ssh://git@10.55.5.123:222/alex_chevski/eatvio.git" +MY_APP_GIT_URL="ssh://git@10.55.5.123:222/eatvio/eatvio.git"