├── .docker └── php │ └── php-ini-overrides.ini ├── README.md └── docker-compose.yml /.docker/php/php-ini-overrides.ini: -------------------------------------------------------------------------------- 1 | upload_max_filesize = 100M 2 | post_max_size = 108M 3 | memory_limit = 1024M 4 | xdebug.max_nesting_level = 1000 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker-Compose for Pimcore 5 and Pimcore 6 2 | Simple and easy Docker-Compose configuration for Pimcore 5 and Pimcore 6. 3 | 4 | Docker-Compose consists of the following images: 5 | - Redis 6 | - MariaDB 10.4 7 | - httpd (Apache 2.4) & PHP-FPM with PHP7.2 and all Pimcore required dependencies (LibreOffice, FFMPEG, Image Libraries, etc) 8 | - PHP-FPM with PHP7.2 and all Pimcore required dependencies (LibreOffice, Image Libraries, etc) (except FFMPEG) 9 | 10 | ## Getting Started 11 | ### Requirements 12 | * git 13 | * docker 14 | * docker-compose 15 | ### Checkout Repo 16 | ```bash 17 | git clone https://github.com/dpfaffenbauer/pimcore-docker-compose.git 18 | cd pimcore-docker-compose/ 19 | ``` 20 | ### Run Containers 21 | ```bash 22 | # initialize and startup containers 23 | docker-compose up -d 24 | ``` 25 | ### Install Pimcore 26 | Choose which package to install 27 | #### Pimcore 5 28 | https://pimcore.com/docs/5.x/Development_Documentation/Getting_Started/Installation.html#page_Choose-a-package-to-install 29 | #### Pimcore 6 30 | https://pimcore.com/docs/6.x/Development_Documentation/Getting_Started/Installation.html#page_Choose-a-package-to-install 31 | ```bash 32 | # get shell in running container 33 | docker exec -it pimcore-php bash 34 | 35 | # replace with the package you with to install 36 | # for example COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo tmp 37 | COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/ tmp 38 | mv tmp/.[!.]* . 39 | mv tmp/* . 40 | rmdir tmp 41 | 42 | #increase the memory_limit to >= 512MB as required by pimcore-install 43 | echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini; 44 | service apache2 reload 45 | 46 | #run installer 47 | ./vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore 48 | 49 | ``` 50 | 51 | ### Use 52 | After the installer is finished, you can open in your Browser: 53 | * Frontend: http://localhost:2000 54 | * Backend: http://localhost:2000/admin 55 | 56 | ### Common Errors 57 | 58 | #### File permissions 59 | On some machines docker has problems with the relative symlinked (static) files. Run those commands in your `pimcore-php` container 60 | 61 | ```bash 62 | docker-compose exec php bash 63 | chown www-data: . -R 64 | ``` 65 | 66 | This could take a while because of the amount of files inside the directory (especially because of the `vendor` folder). There is no guarantee that those commands on all machines and operating systems. 67 | 68 | 69 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.0' 2 | services: 3 | redis: 4 | image: redis:alpine 5 | container_name: pimcore-redis 6 | 7 | db: 8 | image: mariadb:10.4 9 | container_name: pimcore-mariadb 10 | working_dir: /application 11 | command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb-file-format=Barracuda, --innodb-large-prefix=1, --innodb-file-per-table=1] 12 | volumes: 13 | - pimcore-database:/var/lib/mysql 14 | environment: 15 | - MYSQL_ROOT_PASSWORD=ROOT 16 | - MYSQL_DATABASE=pimcore 17 | - MYSQL_USER=pimcore 18 | - MYSQL_PASSWORD=pimcore 19 | 20 | adminer: 21 | image: adminer 22 | restart: always 23 | ports: 24 | - 2002:8080 25 | 26 | php: 27 | image: dpfaffenbauer/pimcore:PHP7.2-apache 28 | container_name: pimcore-php 29 | volumes: 30 | - .:/var/www/html:cached 31 | ports: 32 | - "2000:80" 33 | - "2001:443" 34 | links: 35 | - db:db 36 | - redis:redis 37 | 38 | php-debug: 39 | image: dpfaffenbauer/pimcore:PHP7.2-apache-debug 40 | container_name: pimcore-debug-php 41 | volumes: 42 | - .:/var/www/html:cached 43 | ports: 44 | - "2006:80" 45 | links: 46 | - db:db 47 | - redis:redis 48 | environment: 49 | - PHP_IDE_CONFIG="serverName=localhost" 50 | 51 | volumes: 52 | pimcore-database: 53 | --------------------------------------------------------------------------------