[submodule "install"]
path = install
- url = git@github.com:yomguy/docker-composition-installer.git
+ url = https://github.com/yomguy/docker-composition-installer.git
#!/bin/bash
-cd "$(dirname "$0")"/../../var
+cd "$(dirname "$0")"/../../
-# We need to chown folders as they are docker's volumes
-sudo chown -R $USER media
-sudo chown -R $USER backup
+bin/misc/fix_var_perms.sh
+
+cd "$(dirname "$0")"/../../var/
git pull
if [ "$1" = "--restore-db" ]; then
docker-compose run db /srv/bin/dev/restore_db.sh
fi
-
-# We need to chown folders as they are docker's volumes
-# (do not work on OSX, hence the test)
-if ! uname -a | grep Darwin > /dev/null; then
- sudo chown -R www-data media
- sudo chown -R root backup
-fi
cd "$(dirname "$0")"/../../
-# We need to chown folders as they are docker's volumes
-if ! uname -a | grep Darwin > /dev/null; then
- sudo chown -R $USER var/media
- sudo chown -R $USER var/backup
-fi
+bin/misc/fix_var_perms.sh
# Update main project
git pull
--- /dev/null
+#!/bin/bash
+
+cd "$(dirname "$0")"/../../
+
+# We need to chown folders so that they can be used by the $USER (with an exception on Darwin)
+if ! uname -a | grep Darwin > /dev/null; then
+ INFO=( $(stat -L -c "%a %G %U" var) )
+ OWNER=${INFO[2]}
+ if [ "$OWNER" != "$USER" ]; then
+ sudo chown $USER var
+ sudo chown -R $USER var/media
+ sudo chown -R $USER var/backup
+ fi
+fi
#!/bin/sh
+
options = ""
+
if [ "$1" = "-bg" ]; then
options = $options "-d";
fi
-docker-compose -f docker-compose.yml -f env/prod.yml up $options
\ No newline at end of file
+
+docker-compose -f docker-compose.yml -f env/prod.yml up $options
cd "$(dirname "$0")"/../../
-
-
function usage() {
echo "upgrade the Mezzo production instance with various options"
echo ""