Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Conversation

@thewilkybarkid
Copy link
Contributor

Surprisingly easy to get working with PhpStorm on a Mac (https://blog.jetbrains.com/phpstorm/2018/08/quickstart-with-docker-in-phpstorm/).

@thewilkybarkid thewilkybarkid requested a review from a team as a code owner March 28, 2019 15:53
ENV COMPOSER_ALLOW_SUPERUSER=true

RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
pecl install \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like compiling things for a dynamic language, but no alternative

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did wonder if the compilation could be done separately and the result copied in to save app changes from re-running it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory the end result is just a .so file in the right place, which if the PHP (and OS?) version match should be movable across filesystems. Maintaining the code to move it around might not be worth it though if the primary use case of dev is overriding the code with a host folder mounted as a volume.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will ignore for now, can revisit if it does become annoying.

@thewilkybarkid
Copy link
Contributor Author

Just tried it out a bit more, and it's very slow on Docker for Mac. https://jtreminio.com/blog/developing-at-full-speed-with-xdebug/ looks an interesting technique.


fastcgi_pass app:9000;
fastcgi_pass $fastcgi_pass:9000;
fastcgi_read_timeout 1d; # For Xdebug
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like variables can't be set with time values.

- /app/var
- /app/vendor
depends_on:
- api
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately extends was removed from Docker Compose.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is basically a copy of app with a derived image, which lives only locally. Fair.

@@ -1,3 +1,10 @@
resolver 127.0.0.11;

map $cookie_XDEBUG_SESSION $fastcgi_pass {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this needs to set something specific in the IDE/host, it would need documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should work with any value.

@thewilkybarkid thewilkybarkid merged commit 4ad8ca3 into libero:master Mar 29, 2019
@thewilkybarkid thewilkybarkid deleted the xdebug branch March 29, 2019 16:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants