From eff2396d6055c893c42fcbc51a4deab0160611b2 Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Mon, 21 Oct 2024 17:46:05 +0200 Subject: [PATCH 1/8] Update composer.json --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 82e97e58..0f570217 100644 --- a/composer.json +++ b/composer.json @@ -54,6 +54,9 @@ ], "pimcore-scripts": [ "Pimcore\\Composer::clearCache", + "@pimcore-install-assets" + ], + "pimcore-install-assets":[ "Pimcore\\Composer::installAssets" ] }, From 8583d07fdad34f125d84342c021c58a0cdd9d54d Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Mon, 21 Oct 2024 17:49:35 +0200 Subject: [PATCH 2/8] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ad6b691..ccd6720a 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,14 @@ You don't need to have a PHP environment with composer installed. ### Follow these steps 1. Initialize the demo project using the `pimcore/pimcore` image - ``docker run -u `id -u`:`id -g` --rm -v `pwd`:/var/www/html pimcore/pimcore:php8.3-latest composer create-project pimcore/demo my-project`` + ``docker run -u `id -u`:`id -g` --rm -v `pwd`:/var/www/html pimcore/pimcore:php8.3-latest composer create-project --no-scripts pimcore/demo my-project`` 1. Go to your new project `cd my-project/` 1. Part of the new project is a docker compose file * Run `` echo `id -u`:`id -g` `` to retrieve your local user and group id * Open the `docker-compose.yaml` file in an editor, uncomment all the `user: '1000:1000'` lines and update the ids if necessary * Start the needed services with `docker compose up -d` + * Install the assets by running the script `docker compose exec php composer run-script pimcore-install-assets` 1. Install pimcore and initialize the DB `docker compose exec php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore` * When asked for admin user and password: Choose freely From ebe2d99565cf8e9f2b62bc8744d1b1610044211f Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Tue, 22 Oct 2024 15:16:18 +0200 Subject: [PATCH 3/8] Apply suggestions from code review Co-authored-by: Bernhard Rusch --- README.md | 2 +- composer.json | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index ccd6720a..7b0f3466 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ You don't need to have a PHP environment with composer installed. * Run `` echo `id -u`:`id -g` `` to retrieve your local user and group id * Open the `docker-compose.yaml` file in an editor, uncomment all the `user: '1000:1000'` lines and update the ids if necessary * Start the needed services with `docker compose up -d` - * Install the assets by running the script `docker compose exec php composer run-script pimcore-install-assets` + * Install the assets by running the script `docker compose exec php bin/console assets:install --symlink --relative` 1. Install pimcore and initialize the DB `docker compose exec php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore` * When asked for admin user and password: Choose freely diff --git a/composer.json b/composer.json index 0f570217..82e97e58 100644 --- a/composer.json +++ b/composer.json @@ -54,9 +54,6 @@ ], "pimcore-scripts": [ "Pimcore\\Composer::clearCache", - "@pimcore-install-assets" - ], - "pimcore-install-assets":[ "Pimcore\\Composer::installAssets" ] }, From ad32fe8e8cbf581a1ffd3d8aa5ef879d04383158 Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Tue, 22 Oct 2024 15:21:55 +0200 Subject: [PATCH 4/8] add instruction about cache:clear after pimcore-install --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7b0f3466..94bebcd1 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ You don't need to have a PHP environment with composer installed. `docker compose exec php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore` * When asked for admin user and password: Choose freely * This can take a while, up to 20 minutes +1. Clear and warm up the cache with `docker compose exec php bin/console cache:clear` 1. :heavy_check_mark: DONE - You can now visit your pimcore-demo: * The frontend: * The admin interface, using the credentials you have chosen above: From 9dff9d5702ab50fcfd37421426e32971389e81fb Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Tue, 22 Oct 2024 15:39:29 +0200 Subject: [PATCH 5/8] remove post-install-cmd --- composer.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/composer.json b/composer.json index 82e97e58..cacd4583 100644 --- a/composer.json +++ b/composer.json @@ -44,10 +44,6 @@ }, "scripts": { "post-create-project-cmd": "Pimcore\\Composer::postCreateProject", - "post-install-cmd": [ - "Pimcore\\Composer::postInstall", - "@pimcore-scripts" - ], "post-update-cmd": [ "Pimcore\\Composer::postUpdate", "@pimcore-scripts" From e160f3432078d8f3aff6f2bdfa03545c7d8dc7ec Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Tue, 22 Oct 2024 15:50:43 +0200 Subject: [PATCH 6/8] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 94bebcd1..4a062c8d 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ You don't need to have a PHP environment with composer installed. * Run `` echo `id -u`:`id -g` `` to retrieve your local user and group id * Open the `docker-compose.yaml` file in an editor, uncomment all the `user: '1000:1000'` lines and update the ids if necessary * Start the needed services with `docker compose up -d` + * Run `docker compose exec php composer install` to install the required dependencies * Install the assets by running the script `docker compose exec php bin/console assets:install --symlink --relative` 1. Install pimcore and initialize the DB `docker compose exec php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore` From dacf06a777274a7a9d57bf592948b6d777721dcb Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Tue, 22 Oct 2024 16:14:08 +0200 Subject: [PATCH 7/8] Update README.md without docker --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a062c8d..289d885f 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,12 @@ E-Commerce Applications built with Pimcore. If you are an experienced Pimcore de ## Getting started ```bash -COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo my-project +COMPOSER_MEMORY_LIMIT=-1 composer create-project --no-scripts pimcore/demo my-project cd ./my-project +composer install +./bin/console assets:install --symlink --relative ./vendor/bin/pimcore-install +./bin/console cache:clear ``` - Point your virtual host to `my-project/public` From 257ea625360984ade06369b5bbbad6798e9db5b4 Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Tue, 22 Oct 2024 17:24:20 +0200 Subject: [PATCH 8/8] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 289d885f..bddf6281 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ E-Commerce Applications built with Pimcore. If you are an experienced Pimcore de ```bash COMPOSER_MEMORY_LIMIT=-1 composer create-project --no-scripts pimcore/demo my-project cd ./my-project -composer install ./bin/console assets:install --symlink --relative ./vendor/bin/pimcore-install ./bin/console cache:clear @@ -41,7 +40,6 @@ You don't need to have a PHP environment with composer installed. * Run `` echo `id -u`:`id -g` `` to retrieve your local user and group id * Open the `docker-compose.yaml` file in an editor, uncomment all the `user: '1000:1000'` lines and update the ids if necessary * Start the needed services with `docker compose up -d` - * Run `docker compose exec php composer install` to install the required dependencies * Install the assets by running the script `docker compose exec php bin/console assets:install --symlink --relative` 1. Install pimcore and initialize the DB `docker compose exec php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore`