1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- set -o errexit
- MEM=$(docker info | grep "Total Memory" | cut -d':' -f2 | xargs | sed s/GiB//)
- (( $(echo "$MEM < 5.7" | bc -l) )) && echo "There must be at least 6GB of RAM allocated to Docker to continue." && exit
- source env/db.env
- source env/elasticsearch.env
- source env/opensearch.env
- source env/magento.env
- source env/rabbitmq.env
- DOMAIN=${1:-magento.test}
- bin/stop
- bin/start
- [ $? != 0 ] && echo "Failed to start Docker services" && exit
- bin/clinotty chmod u+x bin/magento
- rm -rf src && mkdir src
- echo "Adding Magento modules to Composer allow-plugins directive..."
- bin/clinotty composer config
- bin/clinotty composer config
- bin/clinotty composer config
- bin/clinotty bin/magento setup:install \
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- echo "Copying files from container to host after install..."
- bin/copyfromcontainer
- echo "Forcing deploy of static content to speed up initial requests..."
- bin/clinotty bin/magento setup:static-content:deploy -f
- echo "Re-indexing with Elasticsearch..."
- 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
- echo "Installing cron, run 'bin/cron start' to enable..."
- bin/clinotty bin/magento cron:install
- echo "Turning on developer mode..."
- bin/clinotty bin/magento deploy:mode:set developer
- cp -r .vscode src/
- echo "Docker development environment setup complete."
- echo "You may now access your Magento instance at https://${DOMAIN}/"
|