From 8f3d45b976f24582304c0c9b07836685fa0fec4e Mon Sep 17 00:00:00 2001 From: Michael Gissing Date: Wed, 10 Jun 2020 09:09:52 +0200 Subject: [PATCH] More verbose and complete docker tutorial (#187) This partially fixes #183 * No need to have PHP/composer installed * More details --- README.md | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ffcfe6bd..b08ae9a3 100644 --- a/README.md +++ b/README.md @@ -17,16 +17,40 @@ cd ./my-project ## Docker -You can also use Docker to setup a new Pimcore Installation: +You can also use Docker to setup a new Pimcore Installation. +You don't need to have a PHP environment with composer installed. + +### Prerequisits + +* Your user must be allowed to run docker commands (directly or via sudo). +* You must have docker-composed installed. +* Your user must be allowed to change file permissions (directly or via sudo). + +### Follow these steps + +1. Initialize the demo project using the `pimcore/pimcore` image + ``docker run --rm -v `pwd`:/var/www/html pimcore/pimcore:PHP7.4-apache composer create-project pimcore/demo my-project`` +1. Fix permissions of the created directory (we are already working on a fix to make this redundant) + `sudo chown -R 1000 my-project/` +1. Go to your new project + `cd my-project/` +1. Part of the new project is a docker compose file. Use it to start the needed services + `docker-compose up -d` +1. Install pimcore and initialize the DB + `docker-compose exec php vendor/bin/pimcore-install --mysql-host-socket=db` + * When asked for admin user and password: Choose freely + * When asked for DB credentials, use the following: + * MySQL username: pimcore + * MySQL password: pimcore + * MySQL database: pimcore + * This can take a while, up to 20 minutes +1. Fix permissions again, the installer has created new directories + `sudo chown -R 1000 .` +1. :heavy_check_mark: DONE - You can now visit your pimcore-demo: + * The frontend: + * The admin interface, using the credentials you have chosen above: + -```bash -COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo my-project -cd ./my-project -docker-compose up -d -docker-compose exec php vendor/bin/pimcore-install --mysql-host-socket=db -``` - -The default docker-compose comes with PHP7.4 on debian-buster and mariadb 10.4. ## Other demo/skeleton packages - [Pimcore Skeleton](https://github.com/pimcore/skeleton/)