From 5680d7d0ab13508f9225b7b3e19812941e1d88d2 Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Thu, 7 Dec 2023 13:53:45 +0300 Subject: [PATCH 1/4] 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 74889aa8211fe879de76c103bca4b3b20827743f Mon Sep 17 00:00:00 2001 From: Anatoliy Poloz Date: Thu, 7 Dec 2023 14:08:30 +0300 Subject: [PATCH 2/4] 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 6e2d876ddcf067ae76f9313b1956af7e1e31a5d7 Mon Sep 17 00:00:00 2001 From: Anatoliy Poloz Date: Thu, 7 Dec 2023 14:12:29 +0300 Subject: [PATCH 3/4] 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" From 1899f3f9662a9c0383a8531da55cc29d615cc7e8 Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Thu, 7 Dec 2023 15:02:05 +0300 Subject: [PATCH 4/4] added to Makefile init command copy env-infra --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 19d8b58..08b98ec 100644 --- a/Makefile +++ b/Makefile @@ -63,4 +63,4 @@ make-storage-link: node-frontend-deps: docker-compose exec php-fpm npm i --legacy-peer-deps -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 +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