Skip to content

Instantly share code, notes, and snippets.

@alexandreelise
Last active August 8, 2020 13:38
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 alexandreelise/22c02f9365fa94a5dc6a51478544c05e to your computer and use it in GitHub Desktop.
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.
#!/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