瀏覽代碼

Some minor fixes for file permissions and composer auth credentials

pniel-cohen 2 年之前
父節點
當前提交
f0124270eb
共有 2 個文件被更改,包括 9 次插入1 次删除
  1. 4 0
      compose/bin/download
  2. 5 1
      compose/bin/setup

+ 4 - 0
compose/bin/download

@@ -19,4 +19,8 @@ docker-compose -f docker-compose.yml up -d
 
 bin/setup-composer-auth
 
+bin/fixowns
+
 bin/clinotty composer create-project --repository=https://repo.magento.com/ magento/project-"${EDITION}"-edition="${VERSION}" .
+
+bin/clinotty [ ! -f "./var/composer_home/auth.json" ] && bin/clinotty mkdir -p ./var/composer_home && bin/clinotty cp /var/www/.composer/auth.json ./var/composer_home/auth.json

+ 5 - 1
compose/bin/setup

@@ -90,6 +90,10 @@ bin/clinotty bin/magento indexer:reindex
 echo "Setting basic URL and generating SSL certificate..."
 bin/setup-domain "${DOMAIN}"
 
+echo "Fixing owner and permissions..."
+bin/fixowns
+bin/fixperms
+
 echo "Clearing the cache to apply updates..."
 bin/clinotty bin/magento cache:flush
 
@@ -99,7 +103,7 @@ bin/clinotty bin/magento cron:install
 echo "Turning on developer mode..."
 bin/clinotty bin/magento deploy:mode:set developer
 
-mv .vscode src/
+cp -r .vscode src/
 
 echo "Docker development environment setup complete."
 echo "You may now access your Magento instance at https://${DOMAIN}/"