The source project of this merge request has been removed.
WIP: Let php-fpm be used through sockets accross different containers
Hi,
I'm trying to use this image with a Nginx and after a couple of hours trying to set it up using hosts and ports (with fastcgi_pass php:9000;
), it seems that using a socket might be a solution.
However, the socket file needs to be 0666
.
This change will allow this:
version: '3'
services:
web:
image: nginx
ports:
- "8000:80"
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- .:/app
- "phpsocket:/run/php"
restart: always
working_dir: "/app"
depends_on:
- php
php:
image: fpfis/httpd-php-dev:7.4
working_dir: /app
volumes:
- .:/app
- "phpsocket:/run/php"
environment:
DOCUMENT_ROOT: /app/public
XDEBUG_MODE: "coverage"
XDEBUG_CONFIG: "remote_enable=1 remote_host=10.254.254.254 remote_port=9000 idekey=PHPSTORM remote_autostart=1"
PHP_IDE_CONFIG: "serverName=Docker"
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
ports:
- "9000:9000"
volumes:
phpsocket: