Browse Source

various fixes

Olivier Massot 5 years ago
parent
commit
d116b6f1f1
3 changed files with 21 additions and 5 deletions
  1. 17 4
      docker/typo3/Dockerfile
  2. 1 0
      docker/typo3/conf/xdebug.ini
  3. 3 1
      docker/typo3/entrypoint.sh

+ 17 - 4
docker/typo3/Dockerfile

@@ -17,10 +17,14 @@ RUN \
     # Install utilities and php extensions
     apt-get clean && apt-get update && apt-get install -y locales; \
     pecl install apcu-5.1.17 && pecl install apcu_bc && pecl install imagick-3.4.3RC2; \
-    apt-get install -y --no-install-recommends libzip-dev zip unzip git nano libonig-dev zlib1g-dev libpng-dev libjpeg-dev; \
-    docker-php-ext-configure zip --with-libzip; \
-    docker-php-ext-install opcache pdo_mysql exif mbstring mysqli gd; \
-    docker-php-ext-enable opcache pdo_mysql exif mbstring mysqli gd; \
+    apt-get install -y --no-install-recommends zip unzip git nano wget less \
+                                               libxml2-dev libpq-dev libzip-dev zlib1g-dev libonig-dev \
+                                               libfreetype6-dev libpng-dev libjpeg-dev libicu-dev libwebp-dev \
+                                               libjpeg62-turbo-dev libxpm-dev graphicsmagick; \
+    docker-php-ext-configure gd  --with-libdir=/usr/include/ --with-jpeg --with-freetype; \
+    docker-php-ext-configure intl; \
+    docker-php-ext-install opcache intl pdo_mysql exif mbstring mysqli gd zip soap; \
+    docker-php-ext-enable opcache; \
 
     # Install and enable xdebug
     pecl install xdebug-2.9.8; \
@@ -32,11 +36,20 @@ RUN \
     php composer-setup.php; \
     php -r "unlink('composer-setup.php');"; \
 
+    # Set locale
+    echo 'fr_FR.UTF-8 UTF-8' > /etc/locale.gen; \
+    locale-gen; \
+
     # Configure apache
     rm /etc/apache2/sites-available/000-default.conf && rm /etc/apache2/sites-available/default-ssl.conf; \
     a2ensite typo3; \
     service apache2 restart;
 
+# Set environment variables
+ENV LANG fr_FR.UTF-8
+ENV LANGUAGE fr_FR:fr
+ENV LC_ALL fr_FR.UTF-8
+
 # Declare the entrypoint.sh file
 COPY ./docker/typo3/entrypoint.sh /entrypoint.sh
 RUN chmod +x /entrypoint.sh

+ 1 - 0
docker/typo3/conf/xdebug.ini

@@ -5,6 +5,7 @@ xdebug.idekey=PHPSTORM
 xdebug.remote_autostart = 1
 xdebug.remote_connect_back = 1
 xdebug.remote_port = 9000
+xdebug.max_nesting_level=400
 
 ; for mac and windows
 ;xdebug.remote_host = host.docker.internal

+ 3 - 1
docker/typo3/entrypoint.sh

@@ -21,7 +21,9 @@ tar -xzf /var/www/typo3/config/sites.tar.gz -C /var/www/typo3/config/
 
 # Finalize
 ln -s /var/opentalent/git/ot_typo3/install/cli /var/www/typo3/cli
-chown -R www-data:www-data /var/www/typo3
+chown -R 1000:www-data /var/www/typo3
+chown -R 1000:www-data /var/opentalent/git/ot_typo3
+chmod -R 771 /var/www/typo3
 touch /var/www/typo3/public/typo3conf/ENABLE_INSTALL_TOOL
 
 # Continue with apache job (without it, docker exits here)