Last active
August 8, 2020 13:38
-
-
Save alexandreelise/22c02f9365fa94a5dc6a51478544c05e to your computer and use it in GitHub Desktop.
jj is a bash script wrapper around the amazing joomlatools/console composer package. It assumes that you already created a self-signed wildcard certitificate in /opt/selfsigned/*.sites.test directory for linux users. For macOS users adapt the script to your environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
RELEASE='3.9' | |
if [[ -z "$1" ]]; then | |
exit 1; | |
fi | |
PROJECT_NAME="$1" | |
if [[ ! -z "$2" ]]; then | |
RELEASE="$2" | |
fi | |
echo "Start" \ | |
&& joomla site:create --www="/home/example/Sites" --mysql-host="127.0.0.1" --mysql-port="3306" --release="${RELEASE}" --ssl-crt="/opt/selfsigned/*.sites.test/certificate.crt" --ssl-key="/opt/selfsigned/*.sites.test/certificate.key" --sample-data="blog" "${PROJECT_NAME}" \ | |
&& echo "127.0.0.1 ${PROJECT_NAME}.sites.test" | sudo tee -a /etc/hosts \ | |
&& echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment