tiredofit / docker-nginx-php-fpm

Dockerized web server and interpreter image with many customizable options
MIT License
138 stars 34 forks source link

PHP does not read environment variables #67

Open akamalmra opened 1 year ago

akamalmra commented 1 year ago

PHP does not read environment variables

using docker-compose.yml file:

version: '3.7'

services:

  nginx-php-fpm-app:

    image: tiredofit/nginx-php-fpm:8.2-alpine

    volumes:
      - ./html/:/www/html
      - ./logs/:/www/logs

    environment:
      - TIMEZONE = Asia/Bahrain
      - PHP_MEMORY_LIMIT = 256M

    ports:
      - 80:80

    restart: always

when viewing PHP info both configuration are still showing the default values:

Best Regards.

HiiZun commented 11 months ago

Hello i'm getting same issue anything new?

tiredofit commented 11 months ago

I haven't included the ability to pass environment variables from system into PHP engine- you can see what is being passed here: https://github.com/tiredofit/docker-nginx-php-fpm/blob/6568eab5ccd3fb9744093e7f1d440e6ab8d376a1/install/assets/php-fpm/fpm/php-fpm.conf#L36

It would need to be a feature added if it was to be possible. I avoid it personally.