Coder Social home page Coder Social logo

websnack-dk / magento Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.17 MB

Script to setup an existing/or- a clean Magento2 installation with DDEV-local.

Home Page: http://magentotool.com/

Shell 91.73% Python 3.51% CSS 0.67% JavaScript 0.49% PHP 3.59%
magento2 ddev-local bash-script

magento's Introduction

GitHub release (latest by date) https://github.com/websnack-dk/magento/graphs/commit-activity

Setup existing/clean magento2 install with DDEV-local.

Only tested on Apple Silicon M1

alt text

Requirements will automatically be installed, except Docker Desktop.

Requirements


✨ Usage

Copy/paste curl-command in an existing or empty project folder and enjoy magento2 ☕

bash <(curl -s https://raw.githubusercontent.com/websnack-dk/magento/main/setup.sh)

Installing a clean magento2 project requires Access Keys (public/private) from marketplace.magento.com


Admin info

Admin url, auto generated. Check app/ect/env.php
User: admin
Pass: admin123


Helpers

ddev ssh into web-container and use shortcut-commands.


# ---- Commands from root via term ---- 

ddev base_url       => Automatic update base_url in core_config_data 

# ---- Custom commands ---- 

magento composer    => Install or upgrade (base) composer packages  
magento deploy      => Enables all modules, except Magento_Csp & Magento_TwoFactorAuth & Runs base setup 
magento rebuild     => Re-compiling all files: Clean, Flush, Upgrade, di:compile & static-content:deploy da_DK  
magento tailwind    => Compile css file, remove generated folders & Clean/flush (Requires tailwind setup in order to work)
magento dump-db     => Export SQL via. magerun2 and removes n98-magerun2.phar

# ---- Data migration, If module is installed ---- 

migrate settings    => Check and run Data migrations
migrate data        => Check and run Settings migration

# ---- Base shortcut helpers ----
 
composer1           => composer self-update --1
composer2           => composer self-update --2
comup               => update composer packages
updatephp           => update-alternatives --config php


# ---- Base Magento2 Shortcuts ----

m                   => bin/magento
mdev                => bin/magento deploy:mode:set developer
mclean              => bin/magento cache:clean
mflush              => bin/magento cache:flush
mdeploy             => bin/magento setup:static-content:deploy -f && bin/magento setup:static-content:deploy -f da_DK
mcompile            => bin/magento setup:di:compile
mupgrade            => bin/magento setup:upgrade
mindexer            => bin/magento indexer:reindex
mcron               => bin/magento cron:run


Observe file changes

Standard observation files .phtml files in app/frontend/design/Magento_Theme/templates/html

Observe files:
Use an external term for watcher. ddev ssh to Watcher-folder.

cd watcher/ && source venv/bin/activate && python3 -m pip install watchdog
python watcher.py

Change file observers in watcher/watcher.py


Maintainer

magento's People

Contributors

williamengbjerg avatar

Stargazers

 avatar

Watchers

 avatar  avatar

magento's Issues

move mode

mode developer mode as the last part in the script

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.