소스 검색

Merge pull request #1 from markshust/master

sync with the original repo
Max Uroda 6 년 전
부모
커밋
1dd639a957
7개의 변경된 파일52개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 0
      .gitattributes
  2. 16 2
      CHANGELOG.md
  3. 30 2
      README.md
  4. 2 2
      compose/magento-2/bin/dev-urn-catalog-generate
  5. 2 1
      compose/magento-2/docker-compose.dev.yml
  6. 1 1
      compose/magento-2/docker-compose.yml
  7. BIN
      docs/course.png

+ 1 - 0
.gitattributes

@@ -0,0 +1 @@
+/docs export-ignore

+ 16 - 2
CHANGELOG.md

@@ -8,7 +8,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 
 - N/A
 
-## [22.0.0] - 2018-02-14
+## [23.0.0] - 2019-04-02
+
+### Added
+- Allow setup without SSH credentials.
+- Documentation for connecting to MySQL.
+- `bin/status` to check container status
+
+### Updated
+- Readme for existing installs
+- `bin/dev-urn-catalog-generate` to look at `src` folder as project root.
+
+### Fixed
+- Readme usage of pasting command into non-standard terminal.
+
+## [22.0.0] - 2019-02-14
 
 ### Added
 - Host bind mount `var/log` folder in `docker-compose.dev.yml` for debugging purposes.
@@ -18,7 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 ### Fixed
 - Cron not working correctly
 
-## [21.1.2] - 2018-02-04
+## [21.1.2] - 2019-02-04
 
 ### Fixed
 - Helper script `bin/fixowns` now fixes permissions on `/var/www` instead of `/var/www/html` folder.

+ 30 - 2
README.md

@@ -11,6 +11,7 @@
 
 ## Table of contents
 
+- [Free Course](#free-course)
 - [Docker Hub](#docker-hub)
 - [Usage](#usage)
 - [Prerequisites](#prerequisites)
@@ -20,6 +21,15 @@
 - [Credits](#credits)
 - [License](#license)
 
+## Free Course
+
+I created a free course which details the basic usage of this project:
+
+<a href="https://courses.markshust.com/p/setup-magento-2-development-environment-docker" target="_blank">
+<img src="https://raw.githubusercontent.com/markshust/docker-magento/master/docs/course.png" alt="Setup a Magento 2 Development Environment with Docker"><br />
+Setup a Magento 2 Development Environment with Docker
+</a>
+
 ## Docker Hub
 
 View Dockerfiles:
@@ -124,8 +134,12 @@ open https://magento2.test
 # Download the Docker Compose template:
 curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash -s -- magento-2
 
-# Replace the contents of /src with the source code of your existing Magento instance
-# Example: git clone git@github.com:myrepo.git src
+# Remove existing src directory:
+rm -rf src
+
+# Replace with existing source code of your existing Magento instance:
+cp ~/Sites/existing src
+# or: git clone git@github.com:myrepo.git src
 
 # Create a DNS host entry for the site:
 echo "127.0.0.1 magento2.test" | sudo tee -a /etc/hosts
@@ -133,7 +147,21 @@ echo "127.0.0.1 magento2.test" | sudo tee -a /etc/hosts
 # Copy some files to the containers and install dependencies, then restart the containers:
 docker-compose up -d
 bin/copytocontainer --all
+
+# Install composer dependencies, then copy artifacts back to the host:
 bin/composer install
+bin/copyfromcontainer vendor
+
+# Import existing database:
+bin/clinotty mysql -hdb -umagento -pmagento magento < existing/magento.sql
+
+# Update database connection details:
+# vi src/app/etc/env.php
+
+# Set base URLs to local environment URL:
+bin/magento config:set web/secure/base_url https://magento2.test/
+bin/magento config:set web/unsecure/base_url https://magento2.test/
+
 bin/restart
 
 open https://magento2.test

+ 2 - 2
compose/magento-2/bin/dev-urn-catalog-generate

@@ -4,7 +4,7 @@ bin/copyfromcontainer misc.xml
 
 sed -i .bak 's?/var/www/html?'`pwd`/src'?' src/misc.xml
 rm src/misc.xml.bak
-mkdir -p .idea
-mv src/misc.xml .idea/misc.xml
+mkdir -p src/.idea
+mv src/misc.xml src/.idea/misc.xml
 
 echo "URN's have been generated, you may now restart PHPStorm"

+ 2 - 1
compose/magento-2/docker-compose.dev.yml

@@ -1,5 +1,5 @@
 # Mark Shust's Docker Configuration for Magento (https://github.com/markshust/docker-magento)
-# Version 22.0.0
+# Version 23.0.0
 
 version: "3"
 
@@ -14,6 +14,7 @@ services:
       - ./src/composer.lock:/var/www/html/composer.lock:delegated
       - ./src/nginx.conf.sample:/var/www/html/nginx.conf:delegated
       #- ./src/var/log:/var/www/html/var/log:delegated
+      #- ./src/var/report:/var/www/html/var/report:delegated
 
   phpfpm:
     volumes: *appvolumes

+ 1 - 1
compose/magento-2/docker-compose.yml

@@ -1,5 +1,5 @@
 # Mark Shust's Docker Configuration for Magento (https://github.com/markshust/docker-magento)
-# Version 22.0.0
+# Version 23.0.0
 
 version: "3"
 

BIN
docs/course.png