|
@@ -71,6 +71,34 @@ git init
|
|
|
|
|
|
7. You may now access your site at `http://magento2.test` (or whatever domain you setup).
|
|
|
|
|
|
+## Setup a New Magento 2 Project in Windows
|
|
|
+
|
|
|
+1. Setup a new project using the Magento 2 compose skeleton:
|
|
|
+
|
|
|
+```
|
|
|
+mkdir magento2 && cd $_
|
|
|
+git init
|
|
|
+git remote add origin git@github.com:markoshust/docker-magento.git
|
|
|
+git fetch origin
|
|
|
+git checkout origin/master -- compose/magento-2-windows
|
|
|
+mv compose/magento-2-windows/* .
|
|
|
+rm -rf compose .git
|
|
|
+git init
|
|
|
+```
|
|
|
+
|
|
|
+2. Download the Magento source code to the `src` folder with: `./bin/download 2.2.2`. Note that the default untar app is quite slow. If you want to speed that up install [7-Zip](http://www.7-zip.de/) and add it to your PATH. It will automatically use 7-Zip if it is available.
|
|
|
+
|
|
|
+3. Copy magento into the docker container with `./bin/copymagento`. This is needed because of mounting restrictions from Windows to Docker. The folders `app/code`, `app/design` and `app/i18n` will however be mounted into the container for ease of development.
|
|
|
+
|
|
|
+4. Add an entry to `/etc/hosts` with your custom domain: `10.254.254.254 magento2.test` (assuming the domain you want to setup is `magento2.test`). Be sure to use a `.test` tld, as `.localhost` and `.dev` will present issues with domain resolution.
|
|
|
+
|
|
|
+5. Start your Docker containers with: `./bin/start`.
|
|
|
+
|
|
|
+6. Run Magento's setup install process with the command: `./bin/setup`. Feel free to edit this file to your liking; at the very least you will probably need to update the `base-url` value to the domain you setup in step 6.
|
|
|
+
|
|
|
+7. You may now access your site at `http://magento2.test` (or whatever domain you setup).
|
|
|
+
|
|
|
+
|
|
|
## Existing Magento Project Setup
|
|
|
|
|
|
See the `compose` folder for sample setups for both Magento 1 and Magento 2. Basically your source code should go in the `src` folder, and you can then kick your project off with `./bin/start`. You may have to complete a few of the steps above to get things functioning properly.
|