mirror of
https://github.com/elyby/accounts.git
synced 2024-11-08 13:42:30 +05:30
В конфиге докера починена работа xdebug
This commit is contained in:
parent
b5ed01853e
commit
c3e7e99baa
@ -10,7 +10,7 @@ node_modules
|
||||
*/config/*-local.php
|
||||
|
||||
# Все временные файлы
|
||||
runtime
|
||||
*/runtime
|
||||
|
||||
# Их по идее и не должно образовываться, но мало ли
|
||||
api/web/assets
|
||||
# Их по идее их не должно образовываться, но мало ли
|
||||
*/web/assets
|
||||
|
2
.env
Normal file
2
.env
Normal file
@ -0,0 +1,2 @@
|
||||
XDEBUG_CONFIG=remote_host=192.168.99.1
|
||||
PHP_IDE_CONFIG=serverName=docker
|
17
Dockerfile
17
Dockerfile
@ -33,14 +33,20 @@ RUN apt-get update \
|
||||
# Поставим xdebug отдельно, т.к. потом его потенциально придётся отсюда убирать
|
||||
RUN yes | pecl install xdebug \
|
||||
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini
|
||||
&& echo "xdebug.default_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_handler=dbgp" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_mode=req" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.cli_color=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.var_display_max_depth=10" >> /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
# Next composer and global composer package, as their versions may change from time to time
|
||||
RUN curl -sS https://getcomposer.org/installer | php \
|
||||
&& mv composer.phar /usr/local/bin/composer.phar \
|
||||
&& composer.phar global require --no-progress "fxp/composer-asset-plugin:~1.1.4" \
|
||||
&& composer.phar global require --no-progress "hirak/prestissimo:~0.2.2"
|
||||
&& composer.phar global require --no-progress "fxp/composer-asset-plugin:~1.1.4" "hirak/prestissimo:~0.2.2"
|
||||
|
||||
COPY ./docker/php/composer.sh /usr/local/bin/composer
|
||||
RUN chmod a+x /usr/local/bin/composer
|
||||
@ -53,9 +59,8 @@ COPY . /var/www/html
|
||||
# The following directories are .dockerignored to not pollute the docker images
|
||||
# with local logs and published assets from development. So we need to create
|
||||
# empty dirs and set right permissions inside the container.
|
||||
RUN mkdir api/runtime api/web/assets console/runtime \
|
||||
RUN mkdir -p api/runtime api/web/assets console/runtime \
|
||||
&& chown www-data:www-data api/runtime api/web/assets console/runtime
|
||||
|
||||
# Expose everything under /var/www (vendor + html)
|
||||
# This is only required for the nginx setup
|
||||
VOLUME ["/var/www"]
|
||||
|
@ -1,13 +1,18 @@
|
||||
version: '2'
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
expose:
|
||||
- "9000"
|
||||
links:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
depends_on:
|
||||
- app-console-account-queue
|
||||
|
||||
volumes:
|
||||
- ./:/var/www/html/
|
||||
env_file: .env
|
||||
environment:
|
||||
ENABLE_ENV_FILE: 1
|
||||
ENABLE_LOCALCONF: 1
|
||||
@ -21,16 +26,6 @@ services:
|
||||
volumes_from:
|
||||
- app
|
||||
|
||||
app:
|
||||
build: .
|
||||
expose:
|
||||
- "9000"
|
||||
volumes:
|
||||
- ./:/var/www/html/
|
||||
environment:
|
||||
ENABLE_ENV_FILE: 1
|
||||
ENABLE_LOCALCONF: 1
|
||||
|
||||
node-dev-server:
|
||||
build: ./frontend
|
||||
ports:
|
||||
|
@ -16,14 +16,10 @@ http {
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
sendfile on;
|
||||
keepalive_timeout 10;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
@ -43,13 +39,14 @@ http {
|
||||
}
|
||||
|
||||
location /api {
|
||||
try_files $uri /api/web/index.php?$args;
|
||||
try_files $uri /api/web/index.php?$args;
|
||||
}
|
||||
|
||||
location ~* \.php$ {
|
||||
fastcgi_pass app:9000;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_pass app:9000;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SERVER_NAME $host;
|
||||
}
|
||||
|
||||
# Раздача статики для frontend
|
||||
@ -58,10 +55,6 @@ http {
|
||||
expires max;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~* \.(htaccess|htpasswd|svn|git) {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
2
environments/docker/.env
Normal file
2
environments/docker/.env
Normal file
@ -0,0 +1,2 @@
|
||||
XDEBUG_CONFIG=remote_host=192.168.99.1
|
||||
PHP_IDE_CONFIG=serverName=docker
|
Loading…
Reference in New Issue
Block a user