]> git.parisson.com Git - docker-django-scripts.git/commitdiff
reorganize scripts
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 14 Mar 2018 09:59:10 +0000 (10:59 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 14 Mar 2018 09:59:10 +0000 (10:59 +0100)
docker-clean.sh [deleted file]
docker-staging.sh [deleted file]
docker/clean.sh [new file with mode: 0755]
gulp.sh [deleted file]
misc/gulp.sh [new file with mode: 0755]
pull.sh [deleted file]
staging/up.sh [new file with mode: 0755]
upgrade.sh [deleted file]

diff --git a/docker-clean.sh b/docker-clean.sh
deleted file mode 100644 (file)
index 5b60d8b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# Delete all stopped containers (including data-only containers)
-docker rm $(docker ps -a -q)
-# Delete all 'untagged/dangling' (<none>) images
-docker rmi $(docker images -q -f dangling=true)
diff --git a/docker-staging.sh b/docker-staging.sh
deleted file mode 100755 (executable)
index d5d8b75..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-docker-compose -f docker-compose.yml -f env/staging.yml up
diff --git a/docker/clean.sh b/docker/clean.sh
new file mode 100755 (executable)
index 0000000..5b60d8b
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Delete all stopped containers (including data-only containers)
+docker rm $(docker ps -a -q)
+# Delete all 'untagged/dangling' (<none>) images
+docker rmi $(docker images -q -f dangling=true)
diff --git a/gulp.sh b/gulp.sh
deleted file mode 100755 (executable)
index dcff3d0..0000000
--- a/gulp.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-docker-compose run app python /srv/app/manage.py gulp
diff --git a/misc/gulp.sh b/misc/gulp.sh
new file mode 100755 (executable)
index 0000000..dcff3d0
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+docker-compose run app python /srv/app/manage.py gulp
diff --git a/pull.sh b/pull.sh
deleted file mode 100755 (executable)
index 9abe193..0000000
--- a/pull.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# We need to chown folders as they are docker's volumes
-sudo chown -R $USER var/media
-sudo chown -R $USER var/backup
-
-# Update main project
-git pull
-
-# Update submodules
-./bin/update_submodules.sh
-
-# Restore database
-if [ "$1" = "--restore-db" ];
-    then
-    docker-compose run db /srv/bin/db/restore.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 var/media
-  sudo chown -R root var/backup
-fi
diff --git a/staging/up.sh b/staging/up.sh
new file mode 100755 (executable)
index 0000000..d5d8b75
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+docker-compose -f docker-compose.yml -f env/staging.yml up
diff --git a/upgrade.sh b/upgrade.sh
deleted file mode 100755 (executable)
index 89df740..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# Update main project
-git pull
-
-# Update submodules
-./bin/update_submodules.sh
-
-# Apply migrations
-if [ "$1" = "--migrate" ];
-    then
-    docker-compose run app python /srv/app/manage.py migrate
-fi
-
-# Build front-end
-./bin/build_front.sh
-
-# Build documentation
-docker-compose run app bash /srv/doc/build.sh
-
-# Reload Wsgi
-if [ "$1" = "-r" ];
-    then
-    touch app/wsgi.py
-fi
-
-# Install local cron to
-if [ "$1" = "--cron" ];
-    then
-    sudo cp ./etc/cron.d/* /etc/cron.d/
-fi