@@ -102,6 +102,9 @@ this GitHub repository to the project directory.
102
102
* Click on the green button "Clone or Download" and select "Download ZIP".
103
103
* Extract the ZIP file contents into the project directory.
104
104
105
+ It is common to modify these downloaded files and delete unwanted files. For
106
+ example, on Mac it is common to delete Windows BAT files.
107
+
105
108
### 2. Review and Update the docker-compose.yml File
106
109
107
110
Review the ` docker-compose.yml ` file in a text editor, making necessary
@@ -165,17 +168,16 @@ need to use `winpty`. In that case you must use the following command.
165
168
166
169
In general this works well, but on Windows the 'exec' command will exit if you
167
170
press CTRL+Z. If you like using CTRL+Z in Linux, this is rather annoying, so
168
- SSH access is recommended instead. SSH is currently only supported in the 'web'
169
- service container.
171
+ SSH access is recommended instead.
170
172
171
173
The ` m2ssh ` BAT and bash scripts automatically pick up the port number from the
172
- ` docker-compose.yml ` file and logs on to the 'magento2' account.
174
+ ` docker-compose.yml ` file and logs on to the 'magento2' account of the 'web'
175
+ container.
173
176
174
177
./m2ssh
175
178
176
- If you are running Docker in VirtualBox, you may need to edit the local ` m2ssh `
177
- and ` m2unison ` scripts to replace "localhost" with the IP address allocated by
178
- VirtualBox.
179
+ If you are running Docker in VirtualBox, you may need to edit the provided
180
+ scripts to replace "localhost" with the IP address allocated by VirtualBox.
179
181
180
182
Note: If you destroy and recreate containers, SSH may report warnings about
181
183
changes in identity and refuse to connect. Use a text editor to remove
@@ -200,11 +202,14 @@ to help restrict access to the download keys.
200
202
** Option 1: Existing Project**
201
203
202
204
If you have an existing project with all the source code already under
203
- ` shared/www ` on your laptop, no additional configuration is needed. If you use
204
- volume mounting, the code will automatically be visible; if you use Unison,
205
- Unison will copy files on your laptop into the web container when it is
205
+ ` shared/www/magento2 ` on your laptop, no additional configuration is needed. If
206
+ you use volume mounting, the code will automatically be visible; if you use
207
+ Unison, Unison will copy files on your laptop into the web container when it is
206
208
started.
207
209
210
+ If using Unison, please note that symbolic links are not copied. You may need
211
+ to run ` composer install ` to recreate any symbolic links required by Composer.
212
+
208
213
** Option 2: Creating a New Project with Composer**
209
214
210
215
Log into the web container.
@@ -224,7 +229,7 @@ down Composer.)
224
229
225
230
** Option 3: Getting Code from a GitHub Project**
226
231
227
- It is strongly recommended to saving your project code in a private git
232
+ It is strongly recommended to save your project code in a private git
228
233
repository on a hosting provider such as GitHub or BitBucket. The following
229
234
describes how a new environment can get the code from such an environment.
230
235
@@ -253,8 +258,8 @@ the main steps most users would take.
253
258
2 . Make sure you have SSH keys set up to access the account. (See
254
259
` magento-cloud ssh-keys ` and ` magento-cloud ssh-key:add ` .) The
255
260
` magento-cloud ` CLI is preinstalled in the web service container.
256
- 3 . In the console, click on "GIT" next to the "CLI" button to show the git
257
- command to check out the project's source code.
261
+ 3 . In the Magento Cloud console, click on "GIT" next to the "CLI" button to
262
+ show the git command to check out the project's source code.
258
263
4 . Remove the default ` magento2 ` directory.
259
264
5 . Check out the cloud git repo under the ` magento2 ` directory. MAKE SURE YOU
260
265
CHANGE THE LAST GIT ARGUMENT TO ` magento2 ` .
@@ -274,16 +279,15 @@ The following is a sample session
274
279
chmod +x bin/magento
275
280
276
281
Note that ` magento-cloud get ` is an alternative to the ` git clone ` command
277
- above. ` magento-cloud build ` runs the ` composer install ` and patching command,
278
- but also runs additional commands (such as ` di-compile ` ) which you may not want
279
- to run during development.
282
+ above, but it is recommended to use ` git ` directly to check the code out into
283
+ the correct directory name (` /var/www/magento2 ` ) as required by DevBox.
280
284
281
285
** Option 5: Internal Development**
282
286
283
287
TODO: THIS SECTION IS INDICATIVE OF FUTURE DIRECTION, NOT SUPPORTED YET.
284
288
285
- This section is ONLY relevant to internal Magento developers, or external
286
- developers wishing to submit a pull request. The following is NOT recommended
289
+ This section is only relevant to internal Magento developers, or external
290
+ developers wishing to submit a pull request. The following is not recommended
287
291
for production sites. (It may however be worth exploring by extension
288
292
developers.)
289
293
@@ -459,9 +463,9 @@ to its output if you ever need to do troubleshooting.
459
463
460
464
If you ever restart the Docker containers, you may need to rerun
461
465
` m2unison-profile ` as the profile file containers the SSH port number used
462
- by the Unison container from the ` docker-compose.yml ` file. (Using the
463
- ` 2223:22 ` syntax for the SSH port number in ` docker-composer.yml ` can avoid
464
- this problem.)
466
+ by the Unison container from the ` docker-compose.yml ` file. (Alternatively,
467
+ using the ` 2223:22 ` syntax to lock down the SSH port number in
468
+ ` docker-composer.yml ` avoids this problem.)
465
469
466
470
** Windows**
467
471
@@ -474,7 +478,8 @@ line arguments. Close the window to kill Unison.
474
478
START m2unison.bat
475
479
476
480
There is a setting at the top of the script to choose between SSH access and
477
- direct sockets. Using a plain socket has been reported to hang occasionally.
481
+ direct sockets. Using plain sockets has been reported to hang occasionally so
482
+ SSH has been enabled by default.
478
483
479
484
### 10. Configure PHP Storm (Optional)
480
485
0 commit comments