Parcourir la source

Blank page after install #185

Mark Shust il y a 5 ans
Parent
commit
7dd35b2f44

+ 9 - 0
CHANGELOG.md

@@ -8,6 +8,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 
 N/A
 
+## [24.2.0] - 2019-10-18
+
+### Fixed
+- Fixed logic of `bin/copyfromcontainer` and `bin/copytocontainer` so subdirectories are now properly copied from and to the container
+
+### Added
+- The `bin/fixowns` script now includes the ability to fix ownerships at the subdirectory level 
+- The `bin/copyfromcontainer` and `bin/copytocontainer` scripts now fixes permissions and ownerships of just the subdirectories that are copied
+
 ## [24.1.2] - 2019-10-15
 
 ### Fixed

+ 2 - 1
compose/magento-2/bin/copyfromcontainer

@@ -5,6 +5,7 @@ if [ "$1" == "--all" ]; then
   docker cp $(docker-compose ps -q phpfpm|awk '{print $1}'):/var/www/html/./ src/
   echo "Completed copying all files from container to host"
 else
-  docker cp $(docker-compose ps -q phpfpm|awk '{print $1}'):/var/www/html/$1 src/$1
+  mkdir -p src/$1
+  docker cp $(docker-compose ps -q phpfpm|awk '{print $1}'):/var/www/html/$1 src/$1/../
   echo "Completed copying $1 from container to host"
 fi

+ 6 - 3
compose/magento-2/bin/copytocontainer

@@ -4,9 +4,12 @@
 if [ "$1" == "--all" ]; then
   docker cp src/./ $(docker-compose ps -q phpfpm|awk '{print $1}'):/var/www/html/
   echo "Completed copying all files from host to container"
+  bin/fixowns
+  bin/fixperms
 else
-  docker cp src/$1 $(docker-compose ps -q phpfpm|awk '{print $1}'):/var/www/html/$1
+  bin/cli mkdir -p $1
+  docker cp src/$1 $(docker-compose ps -q phpfpm|awk '{print $1}'):/var/www/html/$1/../
   echo "Completed copying $1 from host to container"
+  bin/fixowns $1
+  bin/fixperms $1
 fi
-
-bin/fixowns

+ 8 - 1
compose/magento-2/bin/fixowns

@@ -1,3 +1,10 @@
 #!/bin/bash
 echo "Correcting filesystem ownerships..."
-bin/rootnotty chown -R app:app /var/www/
+
+if [ -z "$1" ]; then
+  bin/rootnotty chown -R app:app /var/www/
+else
+  bin/rootnotty chown -R app:app /var/www/html/$1
+fi
+
+echo "Filesystem ownerships corrected."

+ 8 - 3
compose/magento-2/bin/fixperms

@@ -1,8 +1,13 @@
 #!/bin/bash
 echo "Correcting filesystem permissions..."
 
-bin/clinotty find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \;
-bin/clinotty find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \;
-bin/clinotty chmod u+x bin/magento
+if [ -z "$1" ]; then
+  bin/clinotty find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \;
+  bin/clinotty find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \;
+  bin/clinotty chmod u+x bin/magento
+else
+  bin/clinotty find $1 -type f -exec chmod u+w {} \;
+  bin/clinotty find $1 -type d -exec chmod u+w {} \;
+fi
 
 echo "Filesystem permissions corrected."

+ 1 - 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 24.1.2
+# Version 24.2.0
 
 version: "3"
 

+ 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 24.1.2
+# Version 24.2.0
 
 version: "3"