Skip to content

Commit a481100

Browse files
author
Alan Kent
committed
Added shell scripts to turn xdebug on/off.
1 parent f8489f3 commit a481100

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ Create a new project under `/var/www/magento2`. (Update the project version
165165
number as appropriate.)
166166

167167
cd /var/www/magento2
168+
xdebug-off
168169
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition:2.1.8 .
169170
chmod +x bin/magento
170171

@@ -182,6 +183,7 @@ Check out the project from inside the container into the `magento2` directory.
182183
cd /var/www
183184
git clone https://github.com/mycompany/myproject.git magento2
184185
cd magento2
186+
xdebug-off
185187
composer install
186188

187189
**Magento Commerce (Cloud)**
@@ -204,15 +206,17 @@ your own fork repository URL if appropriate.
204206

205207
cd /var/www
206208
git clone https://github.com/magento/magento2.git
207-
cd /var/www/magento2
209+
cd magento2
210+
xdebug-off
208211
composer install
209212

210213
Clone any other projects such as Magento Commerce (formerly Enterprise Edition)
211214
or the B2B code base, if you have appropriate permissions.
212215

213216
cd /var/www
214217
git clone https://github.com/magento/magento2ee.git
215-
cd /var/www/magento2
218+
cd magento2
219+
xdebug-off
216220
composer require ...TODO...
217221

218222
### 6. Create the Database
@@ -224,14 +228,19 @@ Log on to the bash prompt inside the web container
224228

225229
docker-compose exec web bash
226230

227-
Tun the following commands to create a MyQL database to use.
231+
Run the following commands to create a MyQL database for the web site to use
232+
(plus a second database for integration tests to use).
228233

229234
mysql -e 'CREATE DATABASE IF NOT EXISTS magento2;'
235+
mysql -e 'CREATE DATABASE IF NOT EXISTS magento_integration_tests;'
230236

231237
After the database is created, uncomment the line setting the default
232238
database in the MySQL `~/.my.cnf` file.
233239

234240
sed -e 's/#database/database/' -i ~/.my.cnf
241+
242+
The `mysql` command can now be used without arguments or selecting database.
243+
235244
mysql
236245
> SHOW TABLES;
237246
> exit;
@@ -241,10 +250,6 @@ line paramter values as desired).
241250

242251
magento setup:install --db-host=db --db-name=magento2 --db-user=root --db-password=root --admin-firstname=Magento --admin-lastname=Administrator --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 --backend-frontname=admin
243252

244-
Put the site into developer mode.
245-
246-
magento deploy:mode:set developer
247-
248253
It is recommended to NOT include the `--base_url` option during development as
249254
Docker can allocate a port number at random (including when container is
250255
restarted). It also causes problems using BrowserSync and similar tools for
@@ -274,6 +279,14 @@ To load the sample data into the database, run
274279

275280
magento setup:upgrade
276281

282+
### 7. Put Site into Developer Mode
283+
284+
Put the site into developer mode. Turning on xdebug is useful for debuging
285+
purposes, but makes all PHP scripts slower to execute.
286+
287+
magento deploy:mode:set developer
288+
xdebug-on
289+
277290
### 7. Start Unison, if Needed
278291

279292
If you are using Unison for file syncing, you also need to start up a Unison
@@ -407,6 +420,10 @@ To flush various caches:
407420

408421
magento cache:flush
409422

423+
Tell any configured external caches (e.g. Redis) to clean themselves.
424+
425+
magento cache:clean
426+
410427
To run cron by hand if not running automatically (run this twice to gurantee
411428
all jobs are queued and run).
412429

0 commit comments

Comments
 (0)