docker-mautic icon indicating copy to clipboard operation
docker-mautic copied to clipboard

Unable to deploy version 5-fpm with docker-compose

Open AmsellemJoseph opened this issue 1 year ago • 6 comments

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 😊.

AmsellemJoseph avatar Feb 05 '24 07:02 AmsellemJoseph

@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.

mollux avatar Feb 05 '24 11:02 mollux

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 avatar Feb 05 '24 12:02 AmsellemJoseph

Found a solution, thx

AmsellemJoseph avatar Feb 08 '24 15:02 AmsellemJoseph

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

mollux avatar Feb 08 '24 22:02 mollux

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

AmsellemJoseph avatar Feb 11 '24 07:02 AmsellemJoseph

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

elclay7 avatar Mar 02 '24 16:03 elclay7