Giter VIP home page Giter VIP logo

Comments (3)

danielozano avatar danielozano commented on May 30, 2024 1

Hi @winston-magemojo!

The best way is to implement your own Dockerfile, and copy custom .ini config file into the container.
By default our docker php images implement this configuration:

memory_limit = 2G
max_execution_time = 1800
zlib.output_compression = On
cgi.fix_pathinfo = 0
date.timezone = UTC

upload_max_filesize = 20M
post_max_size = 20M

So I recommend you to modify your specific docker-compose.dev.linux.yml or docker-compose.dev.mac.yml and add this lines in the phpfpm service phpfpm, instead of the image tag:

  phpfpm:
    build: ./config/dockergento/phpfpm/ # here just add the route where your new Dockerfile is going to be placed

Then create the Dockerfile with the following content:

FROM modestcoders/php:7.1-fpm-1 // again here add the version of the image you are using (7.2 for example)

USER root

COPY ./conf/*.ini /usr/local/etc/php/conf.d/  // here the route where your .ini files is going to be placed

USER app:app

Then just create your own .ini file (for example custom-config.ini) adding your own memory setting: memory_limit=-1 or whatever you want!

After that you will've to rebuild the containers with the new images, so run dockergento rebuild

Let me know it this explanation helps you! Thank you for giving a try to the tool!

from magento2-dockergento.

WinstonN avatar WinstonN commented on May 30, 2024 1

Hello @danielozano

Thank you very much for this helpful guide!

This worked very well!
I did notice that xdebug was not working with this new setup, and I had a look at https://github.com/ModestCoders/dockerfiles/blob/master/php/7.2-fpm/Dockerfile

..and decided to use that config directory in my docker file too

My Dockerfile now looks iike

# build ontop of the PHP 7.2 image
FROM modestcoders/php:7.2-fpm-1

USER root

# add ini files in a path relative to this Dockerfile
COPY conf/www.conf /usr/local/etc/php-fpm.d/
COPY conf/php.ini /usr/local/etc/php/
COPY conf/xdebug.ini /usr/local/etc/php/conf.d/
COPY conf/php-fpm.conf /usr/local/etc/

USER app:app

Thank you very much again for being so helpful, and I do really enjoy using dockergento <3

from magento2-dockergento.

danielozano avatar danielozano commented on May 30, 2024

Hi @WinstonN , I'm glad this helped you!

Probably the x-debug problem was because of this line COPY ./conf/*.ini /usr/local/etc/php/conf.d/. My fault! You should've pointed you to use another custom file name instead of the original!

Regards! Thank you so much for using the tool!

from magento2-dockergento.

Related Issues (20)

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.