@@ -165,6 +165,7 @@ Create a new project under `/var/www/magento2`. (Update the project version
165
165
number as appropriate.)
166
166
167
167
cd /var/www/magento2
168
+ xdebug-off
168
169
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition:2.1.8 .
169
170
chmod +x bin/magento
170
171
@@ -182,6 +183,7 @@ Check out the project from inside the container into the `magento2` directory.
182
183
cd /var/www
183
184
git clone https://github.com/mycompany/myproject.git magento2
184
185
cd magento2
186
+ xdebug-off
185
187
composer install
186
188
187
189
** Magento Commerce (Cloud)**
@@ -204,15 +206,17 @@ your own fork repository URL if appropriate.
204
206
205
207
cd /var/www
206
208
git clone https://github.com/magento/magento2.git
207
- cd /var/www/magento2
209
+ cd magento2
210
+ xdebug-off
208
211
composer install
209
212
210
213
Clone any other projects such as Magento Commerce (formerly Enterprise Edition)
211
214
or the B2B code base, if you have appropriate permissions.
212
215
213
216
cd /var/www
214
217
git clone https://github.com/magento/magento2ee.git
215
- cd /var/www/magento2
218
+ cd magento2
219
+ xdebug-off
216
220
composer require ...TODO...
217
221
218
222
### 6. Create the Database
@@ -224,14 +228,19 @@ Log on to the bash prompt inside the web container
224
228
225
229
docker-compose exec web bash
226
230
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).
228
233
229
234
mysql -e 'CREATE DATABASE IF NOT EXISTS magento2;'
235
+ mysql -e 'CREATE DATABASE IF NOT EXISTS magento_integration_tests;'
230
236
231
237
After the database is created, uncomment the line setting the default
232
238
database in the MySQL ` ~/.my.cnf ` file.
233
239
234
240
sed -e 's/#database/database/' -i ~/.my.cnf
241
+
242
+ The ` mysql ` command can now be used without arguments or selecting database.
243
+
235
244
mysql
236
245
> SHOW TABLES;
237
246
> exit;
@@ -241,10 +250,6 @@ line paramter values as desired).
241
250
242
251
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
243
252
244
- Put the site into developer mode.
245
-
246
- magento deploy:mode:set developer
247
-
248
253
It is recommended to NOT include the ` --base_url ` option during development as
249
254
Docker can allocate a port number at random (including when container is
250
255
restarted). It also causes problems using BrowserSync and similar tools for
@@ -274,6 +279,14 @@ To load the sample data into the database, run
274
279
275
280
magento setup:upgrade
276
281
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
+
277
290
### 7. Start Unison, if Needed
278
291
279
292
If you are using Unison for file syncing, you also need to start up a Unison
@@ -407,6 +420,10 @@ To flush various caches:
407
420
408
421
magento cache:flush
409
422
423
+ Tell any configured external caches (e.g. Redis) to clean themselves.
424
+
425
+ magento cache:clean
426
+
410
427
To run cron by hand if not running automatically (run this twice to gurantee
411
428
all jobs are queued and run).
412
429
0 commit comments