Skip to content

Instantly share code, notes, and snippets.

@exussum12
Created June 30, 2020 15:54
Show Gist options
  • Save exussum12/ca5651ae93cc7ac5dfaeceef2e9ae968 to your computer and use it in GitHub Desktop.
Save exussum12/ca5651ae93cc7ac5dfaeceef2e9ae968 to your computer and use it in GitHub Desktop.
Xdebug PHP FPM
web:
image: nginx:latest
ports:
- "9991:80"
volumes:
- ./site.conf:/etc/nginx/conf.d/default.conf
links:
- php
php:
build: php
volumes:
- ./:/code
environment:
- XDEBUG_CONFIG=remote_enable=1 remote_connect_back=1
FROM php:7.4-fpm
RUN pecl install xdebug-2.9.6 \
&& docker-php-ext-enable xdebug
server {
index index.php index.html;
server_name _;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /code;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment