Created
June 30, 2020 15:54
-
-
Save exussum12/ca5651ae93cc7ac5dfaeceef2e9ae968 to your computer and use it in GitHub Desktop.
Xdebug PHP FPM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.4-fpm | |
RUN pecl install xdebug-2.9.6 \ | |
&& docker-php-ext-enable xdebug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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