mautic / docker-mautic

Docker Image for Mautic
https://www.mautic.org
370 stars 278 forks source link

Unable to deploy version 5-fpm with docker-compose #253

Open AmsellemJoseph opened 8 months ago

AmsellemJoseph commented 8 months ago

Hey all, Since yesterday, I have been trying to deploy the latest version of Mautic based on the example you give in docker-mautic/examples/fpm-nginx/docker-compose.yml

I followed your instructions to the letter, but I have this error which keeps looping

> mautic_worker_1  | Fatal error: Uncaught Error: Failed opening required 
                     '/var/www/html/vendor/composer/../../docroot/app/AppKernel.php' (include_path='.:/usr/local/lib/php') in 
                     /var/www/html/vendor/composer/autoload_real.php:41
> mautic_worker_1  | Stack trace:
> mautic_worker_1  | #0 /var/www/html/vendor/composer/autoload_real.php(45): {closure}('9de8eb80641f81c...', '/var/www/html/v...')
> mautic_worker_1  | #1 /var/www/html/vendor/autoload.php(25): 
                     ComposerAutoloaderInitaf325ce85282f54a66cd09c4a68a7a26::getLoader()
> mautic_worker_1  | #2 /var/www/html/bin/console(7): require_once('/var/www/html/v...')
> mautic_worker_1  | #3 {main}
> mautic_worker_1  |   thrown in /var/www/html/vendor/composer/autoload_real.php on line 41
> mautic_worker_1  | PHP Warning:  require(/var/www/html/vendor/composer/../../docroot/app/AppKernel.php): Failed to open stream: 
                     No such file or directory in /var/www/html/vendor/composer/autoload_real.php on line 41
> mautic_worker_1  | 

I'm sure I'm missing something but I can't figure out what.

Thank you very much for your work and your responses 😊.

mollux commented 8 months ago

@AmsellemJoseph I can't reproduce this.

when I run docker-compose up -d in the /examples/fpm-nginx folder, I get a working web, worker and cron container.

Did you make any alterations to the example? if so, can you re-check them? as it seems the mautic-docroot volume is missing / not working correcty.

AmsellemJoseph commented 8 months ago

hey @mollux,

Thanks for your response,

I also think that the issue came from mautic-docroot, but my stack is the same as your. The only thing that changes is the db password.

And in the mautic-docroot folder, I only have a file named supervisord.pid with 7 in it and an empty folder named media

AmsellemJoseph commented 8 months ago

Found a solution, thx

mollux commented 8 months ago

@AmsellemJoseph can you share your solution so we can see if it's generic enough to add it to the readme?

AmsellemJoseph commented 7 months ago

yes sur, I had to create a volume named mautic-docroot, and at the end of the docker-compose file, I had to add this:

volumes:
  mautic-docroot:
    driver: local
    driver_opts:
      type: none
      device: ${PWD}/mautic-docroot
      o: bind
elclay7 commented 7 months ago

yes sur, I had to create a volume named mautic-docroot, and at the end of the docker-compose file, I had to add this:

volumes:
  mautic-docroot:
    driver: local
    driver_opts:
      type: none
      device: ${PWD}/mautic-docroot
      o: bind

Please could you share the docker-compose, I have tried many ways and it doesn't work, not even the example version that is in the repository works, I hope you can share it