Skip to content

Commit

Permalink
More verbose and complete docker tutorial (#187)
Browse files Browse the repository at this point in the history
This partially fixes #183 

* No need to have PHP/composer installed
* More details
  • Loading branch information
scolytus authored Jun 10, 2020
1 parent e5403df commit 8f3d45b
Showing 1 changed file with 33 additions and 9 deletions.
42 changes: 33 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <http://localhost>
* The admin interface, using the credentials you have chosen above:
<http://localhost/admin>

```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/)

0 comments on commit 8f3d45b

Please sign in to comment.