This repository was archived by the owner on Nov 21, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +50
-1
lines changed Expand file tree Collapse file tree 4 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ resolver 127.0.0.11; # Docker's embedded DNS server
2+
3+ map $cookie_XDEBUG_SESSION $fastcgi_pass {
4+ default app;
5+ ~.+ app-debug;
6+ }
7+
18server {
29 server_name localhost;
310 listen 80;
@@ -14,7 +21,8 @@ server {
1421 include fastcgi_params;
1522 internal;
1623
17- fastcgi_pass app:9000;
24+ fastcgi_pass $fastcgi_pass:9000;
25+ fastcgi_read_timeout 1d; # For Xdebug
1826 fastcgi_split_path_info ^(.+\.php)(/.*)$;
1927
2028 fastcgi_param SCRIPT_FILENAME /app/public/$fastcgi_script_name;
Original file line number Diff line number Diff line change 1+ xdebug.remote_enable = 1
2+ xdebug.remote_host = host.docker.internal
3+ xdebug.remote_port = 9000
Original file line number Diff line number Diff line change @@ -110,3 +110,22 @@ COPY .docker/php-dev.ini ${PHP_INI_DIR}/conf.d/01-app.ini
110110
111111RUN bin/console assets:install && \
112112 rm -rf var/*
113+
114+
115+
116+ #
117+ # Stage: Debug environment
118+ #
119+ FROM dev AS debug
120+
121+ RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
122+ pecl install \
123+ xdebug-2.7.0 \
124+ && \
125+ docker-php-ext-enable \
126+ xdebug \
127+ && \
128+ apk del .build-deps && \
129+ rm -rf /var/cache/apk/
130+
131+ COPY .docker/php-debug.ini ${PHP_INI_DIR}/conf.d/02-app.ini
Original file line number Diff line number Diff line change @@ -8,3 +8,22 @@ services:
88 - ./:/app
99 - /app/var
1010 - /app/vendor
11+ app-debug :
12+ build :
13+ context : .
14+ target : debug
15+ environment :
16+ API_URI : http://web:8080
17+ APP_SECRET :
18+ DEFAULT_LOCALE : ${DEFAULT_LOCALE:-en}
19+ volumes :
20+ - ./:/app
21+ - /app/var
22+ - /app/vendor
23+ depends_on :
24+ - api
25+ web :
26+ depends_on :
27+ - api
28+ - app
29+ - app-debug
You can’t perform that action at this time.
0 commit comments