DEV Community

Discussion on: Xdebug in PhpStorm with Docker

Collapse
 
jackmiras profile image
Jack Miras

Hello @andythedandy, how are you doing?

Thanks for quoting this part of the post, it was, in fact, missing external links pointing to the other two posts that serve as base to this one.

Talking about the PHP > Servers configuration, we are pointing to port 8000 because we are connecting to the service in our docker-compose stack that has PHP ready to go.

As you will notice, this service which is called app gets built based on a Dockerfile, also explained in a previous post.

Both the post where I share how do I usually build my Dockerfile and docker-compose.yaml are now linked in the same session that initially got you confused.

In case you've notice anything else in this post or if you have other questions, feel free to reach me out.

Collapse
 
mydls_1 profile image
Илья

DC
services:
nginx:
container_name: nginx
build:
context: ./_docker/nginx
dockerfile: Dockerfile
ports:
- "8080:80"
volumes:
- ./src:/var/www/html
networks:
- internal
php:
container_name: php-fpm
build:
context: ./_docker/php-fpm
dockerfile: Dockerfile
volumes:
- ./src:/var/www/html
- ./_docker/php-fpm/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
tty: true
networks:
- internal
networks:
internal:
driver: bridge

Image description

The problem is that I need to reload the page in the browser every time, otherwise it does not show the debug point.