StephenMiracle / frankenwp

MIT License
107 stars 11 forks source link

Make opcache values configurable #24

Open arhue opened 2 months ago

arhue commented 2 months ago

Would be nice if the opcache values were configurable. I'm looking to run WP on a low end server and 128mb is too much memory to allocate to opcache for me.

echo 'opcache.memory_consumption=128'; \

StephenMiracle commented 2 months ago

Ya. This makes sense. Will get it updated.

arhue commented 2 months ago

I managed to solve this with docker compose. You would need a newer version of Docker compose. Config would look something like this.

services:
  wordpress:
  ...
  configs: 
    - source: php_ini
      target: /dest/to/php.ini
configs:
  php_ini:
    content: |
       insert-php-ini-content-here-line1
       insert-php-ini-content-here-line2
StephenMiracle commented 2 months ago

hm. This is an interesting solution. another similar solution is to do something like the following. You would just need to save that custom.ini locally. It is a similar approach to examples/debug


services:
  wordpress:
    ...
    volumes:
      - ./custom.ini /usr/local/etc/php/conf.d/custom.ini