TrafeX/docker-php-nginx

Externally managed config files

Closed this issue · 1 comments

From your README.md this option exists. Two things,

1: the file names don't match what you have in your config folder. Im just splitting hairs here but it is an opportunity to ammend your README.md to reflect correct file naming.

Nginx configuration:

docker run -v "pwd/**nginx-server.conf**:/etc/nginx/conf.d/server.conf" trafex/php-nginx
PHP configuration:

docker run -v "pwd/**php-setting.ini**:/etc/php84/conf.d/settings.ini" trafex/php-nginx
PHP-FPM configuration:

docker run -v "pwd/**php-fpm-settings.conf**:/etc/php84/php-fpm.d/server.conf" trafex/php-nginx

2: When the container starts, any of the mapped files fail. as it shows as a directory and not a file.

2025-01-28 16:20:18,731 INFO supervisord started with pid 1

2025-01-28 16:20:19,734 INFO spawned: 'nginx' with pid 7

2025-01-28 16:20:19,737 INFO spawned: 'php-fpm' with pid 8

nginx: [crit] pread() "/etc/nginx/conf.d/server.conf" failed (21: Is a directory)

2025-01-28 16:20:19,743 WARN exited: nginx (exit status 1; not expected)

2025-01-28 16:20:19,783 INFO gave up: nginx entered FATAL state, too many start retries too quickly

[28-Jan-2025 16:20:19] NOTICE: fpm is running, pid 8

[28-Jan-2025 16:20:19] NOTICE: ready to handle connections

2025-01-28 16:20:20,788 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

I was able to get it to work with absolute pathing. So it's definitely a "me" issue...

Ex:

volumes:
            - /home/addohm/cdc/v2/:/var/www/html
            - /home/addohm/cdc/v2/docker/nginx.conf:/etc/nginx/conf.d/server.conf:ro

But..right away, theres an error in the conf you've provided.

nginx: [emerg] "worker_processes" directive is not allowed here in /etc/nginx/conf.d/server.conf:1