To use xdebug with macOS and docker is quite, let´s call it tricky ;)
The following steps need to be proceed to get it working:
- use the config from the xdebug.ini wihtin your docker web container. Important: set remote_connect_back to off
#!/bin/bash | |
if [ $# != 2 ]; then | |
echo "Usage: googledown.sh ID save_name" | |
exit 0 | |
fi | |
confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id='$1 -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p') | |
echo $confirm | |
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$confirm&id=$1" -O $2 && rm -rf /tmp/cookies.txt |
FROM sirajul/php74-fpm:latest | |
RUN pecl install xdebug | |
#RUN docker-php-ext-enable xdebug | |
RUN mkdir -p /home/xdebug | |
COPY ./docker/php/xdebug-debug.ini /home/xdebug/xdebug-debug.ini | |
COPY ./docker/php/xdebug-default.ini /home/xdebug/xdebug-default.ini | |
COPY ./docker/php/xdebug-off.ini /home/xdebug/xdebug-off.ini | |
COPY ./docker/php/xdebug-profile.ini /home/xdebug/xdebug-profile.ini |
<?php | |
/** | |
* Helper for determining system memory usage | |
* | |
* Uses OS tools to provide accurate information about factual memory consumption. | |
* The PHP standard functions may return incorrect information because the process itself may have leaks. | |
* | |
* Copyright © Magento, Inc. All rights reserved. | |
* See COPYING.txt for license details. | |
*/ |
<?php | |
return [ | |
'db-host' => '172.21.0.1', | |
'db-user' => 'root', | |
'db-password' => 'root', | |
'db-name' => 'magento_integration_tests', | |
'db-prefix' => '', | |
'backend-frontname' => 'backend', | |
'admin-user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME, | |
'admin-password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD, |
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" | |
colors="true" | |
bootstrap="./framework/bootstrap.php" | |
> | |
<testsuites> | |
<testsuite name="Memory Usage Tests"> | |
<directory>../../../app/code/*/*/Test/Integration</directory> |
version: "3.7" | |
services: | |
service1: | |
volumes: | |
- your-app-mutagen-service1:/var/app:nocopy | |
service2: | |
volumes: | |
- your-app-mutagen-service2:/var/app:nocopy |
FROM sensson/magento2 | |
COPY src/cron /etc/cron.d/magento2 | |
COPY src/ /var/www/html/ |
# Delete all cached images older than 365 days | |
find ~/public/media/catalog/product/cache/* -type f -atime +365 -exec rm {} \; | |
# Remove product images that are not present in the database | |
magerun media:images:removeorphans |
#!/bin/bash | |
DBUSER="root"; | |
DBPASS=""; | |
DBHOST="localhost"; | |
DB_OLD=mydatabase | |
DB_NEW=clone_mydatabase | |
DBCONN="--host=${DBHOST} --user=${DBUSER} --password=${DBPASS}"; |