easyengine icon indicating copy to clipboard operation
easyengine copied to clipboard

How to add module php-gettext

Open alexdhika opened this issue 5 years ago • 1 comments

How to enable php gettext module?

I try enter shell and install from apt but failed

Thanks

alexdhika avatar May 23 '19 09:05 alexdhika

Horrible process but the solution came out okay enough.

In your site directory (eg /opt/easyengine/sites/mysite.com make a file named php.Dockerfile:

FROM easyengine/php:v4.6.6
USER root
RUN docker-php-ext-install gettext; \
    docker-php-ext-enable gettext
RUN sed -i 's/;extension=gettext/extension=gettext/' /usr/local/etc/php/php.ini
USER www-data

Edit /opt/easyengine/sites/mysite.com/docker-compose.yml and edit the first service definition to be like this:

version: '3.5'

services:

  php:
    #image: easyengine/php:v4.6.6
    build:
      context: /opt/easyengine/sites/mysite.com/.docker
      dockerfile: /opt/easyengine/sites/mysite.com/php.Dockerfile
    restart: always
# rest of file below
# ...

Then so we have a blank build context directory for the docker container, run mkdir /opt/easyengine/sites/mysite.com/.docker

Then run either ee site enable mysite.com --force or cd to the site directory and run docker-compose -f docker-compose.yml up -d --build php.


Honestly though after reading some of the easyengine docker files I will not be using it again in the future. They suck pretty bad

ryanhalliday avatar Jan 10 '24 02:01 ryanhalliday