Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@joncrain
Last active April 20, 2021 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joncrain/43cfb62d1559a1a5e69720271c93231a to your computer and use it in GitHub Desktop.
Save joncrain/43cfb62d1559a1a5e69720271c93231a to your computer and use it in GitHub Desktop.
New MunkiReport dev environment including a new module
#!/bin/bash
dev_site_root=~/Documents/munkireport-awesome
module_name=awesome
git clone https://github.com/munkireport/munkireport-php.git $dev_site_root
cd $dev_site_root
#### Choose the branch to load:
# git checkout master
git checkout wip
# git checkout tags/v3.2.6
git pull
# echo '<?php' > config.php # needed for < v4
echo 'AUTH_METHODS="NOAUTH"' > .env
composer install --no-dev --no-suggest --optimize-autoloader
# composer update --no-dev
# composer dumpautoload --optimize --no-dev
./please migrate
mkdir custom_modules
cd custom_modules
##### this will edit the .env to add the full path to the custom_modules dir
echo "MODULE_SEARCH_PATHS=$(pwd)" >> ../.env
./please make module
# ##### this will make sure that the module is loaded
# echo "MODULES='$module_name,munkireport,managedinstalls,disk_report'" >> ../.env
# php -S localhost:8080 -t $dev_site_root/public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment