Merge branch '187-repo-mode-to-retrieve-application-recipe' into 'develop'
Resolve "REPO mode to retrieve application recipe" See merge request libre.sh/compose.libre.sh!188
This commit is contained in:
commit
48c0cbb407
2 changed files with 49 additions and 10 deletions
|
@ -1,16 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
#Current version of libre.sh to be installed
|
||||
LIBRE_VERSION=1.1
|
||||
# System env vars
|
||||
LIBRE_VERSION=187-repo-mode-to-retrieve-application-recipe
|
||||
# System env vars : can be overrided by a values.env file next to this install file
|
||||
|
||||
|
||||
### CONFIG : Specify you template repo ROOT without training slash (Optional) or comment if you want to supply full url for apps
|
||||
|
||||
APP_REPO_URL="lab.libreho.st/libre.sh/compose"
|
||||
|
||||
## domain handling
|
||||
|
||||
### TODO : Specify you template repo ROOT
|
||||
|
||||
TEMPLATES_ROOT=lab.libreho.st/libre.sh/compose/
|
||||
|
||||
### TODO : change to your domain vendor ( ovh , online, )
|
||||
### CONFIG : change to your domain vendor ( namecheap, ovh , scaleway, )
|
||||
DOMAIN_SERVER=namecheap
|
||||
|
||||
### Namecheap specific
|
||||
|
@ -18,12 +19,19 @@ NAMECHEAP_URL="namecheap.com"
|
|||
NAMECHEAP_API_USER="pierreo"
|
||||
NAMECHEAP_API_KEY=
|
||||
|
||||
### ovh specific
|
||||
### ovh specific (WIP)
|
||||
OVH_URL="eu.api.ovh.com"
|
||||
OVH_API_USER=""
|
||||
OVH_API_KEY=
|
||||
|
||||
|
||||
### Scaleway specific (WIP)
|
||||
SCALEWAY_URL=""
|
||||
SCALEWAY_API_USER=""
|
||||
SCALEWAY_API_KEY=
|
||||
|
||||
|
||||
### TODO : change your settings
|
||||
IP="curl -s http://icanhazip.com/"
|
||||
FirstName="Pierre"
|
||||
LastName="Ozoux"
|
||||
|
@ -36,16 +44,22 @@ City="Lisbon"
|
|||
CountryCode="PT"
|
||||
## Backup
|
||||
BACKUP_DESTINATION=root@xxxxx:port
|
||||
|
||||
### CONFIG : Change your mail settings.
|
||||
## SMTP
|
||||
MAIL_USER=
|
||||
MAIL_PASS=
|
||||
MAIL_HOST=mail.indie.host
|
||||
MAIL_PORT=587
|
||||
|
||||
|
||||
### TODO : source a setting file is present to override defaults
|
||||
|
||||
echo "-------- Welcome to libre.sh $LIBRE_VERSION installer"
|
||||
|
||||
echo "---- sourcing local values.env file if present"
|
||||
|
||||
source values.env
|
||||
|
||||
|
||||
# STEP add kernel parameter
|
||||
|
||||
|
@ -53,6 +67,18 @@ echo "-------- Welcome to libre.sh $LIBRE_VERSION installer"
|
|||
|
||||
echo "-------- setting up system variables"
|
||||
|
||||
echo "APP_REPO_URL=${APP_REPO_URL}" >> /etc/environment
|
||||
|
||||
echo "LIBRE_VERSION=${LIBRE_VERSION}" >> /etc/environment
|
||||
|
||||
echo "MAIL_USER=${MAIL_USER}" >> /etc/environment
|
||||
|
||||
echo "MAIL_PASS=${MAIL_PASS}" >> /etc/environment
|
||||
|
||||
echo "MAIL_HOST=${MAIL_HOST}" >> /etc/environment
|
||||
|
||||
echo "MAIL_PORT=${MAIL_PORT}" >> /etc/environment
|
||||
|
||||
|
||||
# STEP Install Docker
|
||||
|
||||
|
@ -98,3 +124,5 @@ cat > /etc/profile.d/libre.sh <<EOF
|
|||
export PATH=$PATH:/opt/bin
|
||||
EOF
|
||||
chmod 644 /etc/profile.d/libre.sh
|
||||
bash /etc/profile.d/libre.sh
|
||||
|
||||
|
|
|
@ -103,7 +103,18 @@ function buy_domain_name () {
|
|||
}
|
||||
|
||||
function application () {
|
||||
git clone https://${arg_a}.git /data/domains/${arg_u}
|
||||
|
||||
#We check if a APP_REPO_URL was specified
|
||||
|
||||
if [ -z ${APP_REPO_URL:-} ]; then
|
||||
warning "NO repo URL specified, using argument as full URL"
|
||||
git_url=https://${arg_a}.git
|
||||
else
|
||||
warning "REPO specified, using argument as app name"
|
||||
git_url=https://${APP_REPO_URL}/${arg_a}.git
|
||||
fi
|
||||
|
||||
git clone ${git_url} /data/domains/${arg_u}
|
||||
cd /data/domains/${arg_u}
|
||||
if [ -f ./scripts/install ]; then
|
||||
export URL=${arg_u}
|
||||
|
|
Loading…
Reference in a new issue