Git Product home page Git Product logo

pimcore-docker-setup's Introduction

pimcore-docker-setup

Simple Docker setup for pimcore local development. This will install Pimcore 6.1.0 (as of August 19).

You can also read a short summary here Blog Post - Pimcore Docker Setup

Run Docker

  • Go to root directory
  • run docker-compose build
  • run docker-compose up -d

Install Pimcore within container

After starting the container some additional manual steps are needed.

Go into the PHP container with

  • run docker-compose exec php bash

Install pimcore (see https://pimcore.com/de/download)

  • run COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo-basic-twig pimcore

The pimcore project structure will be created in the directory pimcore

Change owner for calling next commands.

  • run chown -R 1000:1000 pimcore

The next command creates pimcore with an initial admin user and our defined database properties.

  • run cd pimcore && COMPOSER_MEMORY_LIMIT=-1 ./vendor/bin/pimcore-install --admin-username=admin --admin-password=admin --mysql-host-socket=mysql --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore --no-interaction

  • run chown -R 1000:1000 var

  • run php bin/console assets:install web

Generate Thumbnails

Pimcore offers a lot of custom commmands. For generating thumbnails run php bin/console pimcore:thumbnails:image in you php container.

To preview images in admin panel, make sure you have the right permissions. As a workaround set chmod -R 777 web/var or chmod -R 777 var

Access Pimcore

You can now access pimcore frontend at http://localhost:8080 and admin at http://localhost:8080/admin

Troubleshooting

If you're getting the following error with Pimcore 6

* Warning: Declaration of Pimcore\Bundle\CoreBundle\EventListener\LegacyTemplateListener::onKernelView(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event) should be compatible with Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelView(Symfony\Component\HttpKernel\Event\KernelEvent $event)

You can fix it with changing the pimcore/composer.json file and require and older version of sensio/framework-extra-bundle

The require part should look like this:

"require": {
    "php": ">=7.2",
    "wikimedia/composer-merge-plugin": "^1.4",
    "pimcore/pimcore": "~6.0.0",
    "sensio/framework-extra-bundle": "5.3.1"
  },

Then run composer update and the pimcore-install script again.

pimcore-docker-setup's People

Contributors

h4rdc0m avatar patrickfabrizius avatar stefanied avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pimcore-docker-setup's Issues

Fatal error: Allowed memory size ... exhausted ...

hi
on localhost:8080 i got this :Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/pimcore/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107

First i thought the issue was in php.ini, but seems not.
Any idea ?
thank you

can't create /var/log

Can you please replace

chmod -R 777 web/var

with

chmod -R 777 web/var
chmod -R 777 var

Docker - nginx folder does not exist inside /etc

According to your docker-compose.yml the site.conf (inside the service nginx) will be pasted to the path "/etc/nginx/conf.d/default.conf".

services:
    nginx:
        image: nginx:latest
        ports:
            - "8080:80"
        volumes:
            - .:/var/www/html
            - ./docker/nginx/config/site.conf:/etc/nginx/conf.d/default.conf
        links:
            - php
        networks:
            - pimcorenet

My problem is now that no folder with the name nginx exists within the directory /etc and consequently the document root and other stuff is mapped wrong.

drwxr-xr-x 1 root root    4096 Aug 21 19:31 .
drwxr-xr-x 1 root root    4096 Aug 21 19:30 ..
-rw------- 1 root root       0 Aug 12 00:00 .pwd.lock
-rw-r--r-- 1 root root    2981 Aug 12 00:00 adduser.conf
drwxr-xr-x 1 root root    4096 Aug 21 19:26 alternatives
drwxr-xr-x 3 root root    4096 Aug 21 19:26 apache2
drwxr-xr-x 1 root root    4096 Aug 12 00:00 apt
-rw-r--r-- 1 root root    1994 Apr 18 04:12 bash.bashrc
drwxr-xr-x 2 root root    4096 Aug 21 19:26 bash_completion.d
-rw-r--r-- 1 root root     367 Mar  2  2018 bindresvport.blacklist
drwxr-xr-x 3 root root    4096 Aug 14 07:30 ca-certificates
-rw-r--r-- 1 root root    5713 Aug 14 07:31 ca-certificates.conf
drwxr-xr-x 2 root root    4096 Aug 12 00:00 cron.daily
-rw-r--r-- 1 root root    2969 Feb 26 09:30 debconf.conf
-rw-r--r-- 1 root root       5 Apr 19 11:00 debian_version
drwxr-xr-x 1 root root    4096 Aug 21 19:31 default
-rw-r--r-- 1 root root     604 Jun 26  2016 deluser.conf
drwxr-xr-x 1 root root    4096 Aug 14 07:31 dpkg
drwxr-xr-x 3 root root    4096 Aug 14 07:30 emacs
-rw-r--r-- 1 root root       0 Aug 12 00:00 environment
drwxr-xr-x 4 root root    4096 Aug 21 19:31 fonts
-rw-r--r-- 1 root root      37 Aug 12 00:00 fstab
-rw-r--r-- 1 root root    2584 Aug  1  2018 gai.conf
-rw-r--r-- 1 root root     446 Aug 12 00:00 group
-rw-r--r-- 1 root root     446 Aug 12 00:00 group-
-rw-r----- 1 root shadow   374 Aug 12 00:00 gshadow
drwxr-xr-x 3 root root    4096 Aug 14 07:30 gss
-rw-r--r-- 1 root root       9 Aug  7  2006 host.conf
-rw-r--r-- 1 root root      13 Aug 21 19:30 hostname
-rw-r--r-- 1 root root     174 Aug 21 19:30 hosts
drwxr-xr-x 1 root root    4096 Aug 21 19:31 init.d
-rw-r--r-- 1 root root    1748 May  5  2018 inputrc
-rw-r--r-- 1 root root      27 May 13 20:25 issue
-rw-r--r-- 1 root root      20 May 13 20:25 issue.net
drwxr-xr-x 3 root root    4096 May 28 14:40 kernel
-rw-r--r-- 1 root root   17842 Aug 21 19:31 ld.so.cache
-rw-r--r-- 1 root root      34 Mar  2  2018 ld.so.conf
drwxr-xr-x 2 root root    4096 Aug 12 00:00 ld.so.conf.d
drwxr-xr-x 2 root root    4096 Aug 14 07:31 ldap
-rw-r--r-- 1 root root     191 Apr 25 14:47 libaudit.conf
drwxr-xr-x 4 root root    4096 Aug 21 19:26 lighttpd
lrwxrwxrwx 1 root root      27 Aug 12 00:00 localtime -> /usr/share/zoneinfo/Etc/UTC
-rw-r--r-- 1 root root   10477 Jul 27  2018 login.defs
drwxr-xr-x 1 root root    4096 Aug 21 19:31 logrotate.d
-rw-r--r-- 1 root root      33 Aug 12 00:00 machine-id
-rw-r--r-- 1 root root     111 Mar  2 07:05 magic
-rw-r--r-- 1 root root     111 Mar  2 07:05 magic.mime
-rw-r--r-- 1 root root     812 Dec 16  2018 mke2fs.conf
-rw-r--r-- 1 root root     286 May 13 20:25 motd
lrwxrwxrwx 1 root root      12 Aug 21 19:30 mtab -> /proc/mounts
drwxr-xr-x 4 root root    4096 Aug 21 19:26 mysql
drwxr-xr-x 8 root root    4096 Aug 21 19:31 nginx
-rw-r--r-- 1 root root     494 Feb 10  2019 nsswitch.conf
drwxr-xr-x 2 root root    4096 Aug 12 00:00 opt
lrwxrwxrwx 1 root root      21 May 13 20:25 os-release -> ../usr/lib/os-release
-rw-r--r-- 1 root root     552 Feb 14  2019 pam.conf
drwxr-xr-x 2 root root    4096 Aug 12 00:00 pam.d
-rw-r--r-- 1 root root     926 Aug 12 00:00 passwd
-rw-r--r-- 1 root root     926 Aug 12 00:00 passwd-
drwxr-xr-x 4 root root    4096 Aug 14 07:30 perl
-rw-r--r-- 1 root root     767 Mar  4  2016 profile
drwxr-xr-x 2 root root    4096 May 13 20:25 profile.d
drwxr-xr-x 1 root root    4096 Aug 21 19:31 rc0.d
drwxr-xr-x 1 root root    4096 Aug 21 19:31 rc1.d
drwxr-xr-x 1 root root    4096 Aug 21 19:31 rc2.d
drwxr-xr-x 1 root root    4096 Aug 21 19:31 rc3.d
drwxr-xr-x 1 root root    4096 Aug 21 19:31 rc4.d
drwxr-xr-x 1 root root    4096 Aug 21 19:31 rc5.d
drwxr-xr-x 1 root root    4096 Aug 21 19:31 rc6.d
drwxr-xr-x 2 root root    4096 Aug 12 00:00 rcS.d
-rw-r--r-- 1 root root      38 Aug 21 19:30 resolv.conf
lrwxrwxrwx 1 root root      13 Apr 23 16:05 rmt -> /usr/sbin/rmt
-rw-r--r-- 1 root root    4141 Jul 27  2018 securetty
drwxr-xr-x 4 root root    4096 Aug 12 00:00 security
drwxr-xr-x 2 root root    4096 Aug 12 00:00 selinux
-rw-r----- 1 root shadow   501 Aug 12 00:00 shadow
-rw-r----- 1 root shadow   501 Aug 12 00:00 shadow-
-rw-r--r-- 1 root root      73 Aug 12 00:00 shells
drwxr-xr-x 2 root root    4096 Aug 12 00:00 skel
drwxr-xr-x 4 root root    4096 Aug 14 07:31 ssl
-rw-r--r-- 1 root root       0 Aug 12 00:00 subgid
-rw-r--r-- 1 root root       0 Aug 12 00:00 subuid
drwxr-xr-x 1 root root    4096 Dec  3  2018 systemd
drwxr-xr-x 2 root root    4096 Aug 12 00:00 terminfo
-rw-r--r-- 1 root root       8 Aug 12 00:00 timezone
-rw-r--r-- 1 root root    1260 Dec 14  2018 ucf.conf
drwxr-xr-x 3 root root    4096 Aug 21 19:31 ufw
drwxr-xr-x 2 root root    4096 Aug 12 00:00 update-motd.d
-rw-r--r-- 1 root root     642 Mar  1 22:03 xattr.conf

Chown typo?

Hello,

shouldnt it be "run chown -R www-data:www-data pimcore" instead of "run chown -R 1000:1000 pimcore"?

error on execute /vendor/bin/pimcore-install

Hi, first of all thank for your great work :)

If I try to install pimcore i get the following error:

* Warning: Declaration of Pimcore\Bundle\CoreBundle\EventListener\LegacyTemplateListener::onKernelView(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event) should be compatible with Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelView(Symfony\Component\HttpKernel\Event\KernelEvent $event)

and the install script stops on 50%.

Could this be an issue with the latest pimcore 6 version, because pimcore has changed the symfony version from 3 to 4.

Thanks
Chris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.