Skip to content
Snippets Groups Projects
Unverified Commit c5698dcc authored by Vincent Sellier's avatar Vincent Sellier
Browse files

Add util script and doc for applications

parent c22423c3
Branches
Tags
No related merge requests found
...@@ -101,3 +101,13 @@ We will now create a personal instance `myuser.cozy.mydomain.tld` : ...@@ -101,3 +101,13 @@ We will now create a personal instance `myuser.cozy.mydomain.tld` :
Open in a browser the url displayed at the end of the script output to finalize the instance configuration. Open in a browser the url displayed at the end of the script output to finalize the instance configuration.
:+1: Congratulations you have now your own cozy cloud. :+1: Congratulations you have now your own cozy cloud.
## Install applications
[Drive](https://github.com/cozy/cozy-drive) and [Photo](https://github.com/cozy/cozy-photos) are installed by default by the [create-instance.sh](create-instance.sh) script. Other applications like [banks](https://github.com/cozy/cozy-banks) or [contacts](https://github.com/cozy/cozy-contacts) are also available.
To install an application, you can run the [application.sh](application.sh) script :
```
sudo ./application.sh <instance name> <application>
```
#!/usr/bin/env bash
set -u
function usage() {
echo "Install official applications"
echo
echo "Usage: $0 <instance> <application>"
echo "Non exhaustive list of official possible applications :"
echo " - drive (installed by default)"
echo " - photos (installed by default)"
echo " - settings (installed by default)"
echo " - banks"
echo " - contacts"
exit 1
}
if [ $# -eq 0 ]; then
usage
fi
if [ ! -e ".env" ]; then
echo "Environnement configuration not found (.env file)"
exit 1
fi
source .env
INSTANCE_ID=$1
APP=$2
INSTANCE="${INSTANCE_ID}.${COZY_TLD}"
echo "Installing $APP application on $INSTANCE"
if [ "$APP" == "banks" ]; then
BRANCH="latest"
else
BRANCH="build"
fi
BASE_URL="git://github.com/cozy/cozy-"
APP_URL="${BASE_URL}${APP}.git#${BRANCH}"
echo "Installing from ${APP_URL}"
# TODO allow different actions
docker-compose exec cozy ./cozy apps install --domain ${INSTANCE} ${APP} ${APP_URL}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment