EasyEngine / easyengine

Command-line control panel for Nginx Server to manage WordPress sites running on Nginx, PHP, MySQL, and Let's Encrypt
https://easyengine.io
MIT License
2.11k stars 435 forks source link

How to add module php-gettext #1419

Open alexdhika opened 5 years ago

alexdhika commented 5 years ago

How to enable php gettext module?

I try enter shell and install from apt but failed

Thanks

ryanhalliday commented 8 months ago

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