From 85d1fe12d38ae1161f888cb4029ef663c16b67bd Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Sat, 18 Jun 2016 14:12:18 +0200 Subject: [PATCH] add deploy scripts --- deploy/deploy.sh | 8 ++++++++ deploy/prepare_release.sh | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 deploy/deploy.sh create mode 100644 deploy/prepare_release.sh diff --git a/deploy/deploy.sh b/deploy/deploy.sh new file mode 100644 index 0000000..49a7792 --- /dev/null +++ b/deploy/deploy.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +cd .. +export COMPOSE_HTTP_TIMEOUT=120 +docker-compose -f docker-compose.yml -f docker-compose.prod.yml rm -f +docker-compose -f docker-compose.yml -f docker-compose.prod.yml pull +docker-compose -f docker-compose.yml -f docker-compose.prod.yml build +docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d \ No newline at end of file diff --git a/deploy/prepare_release.sh b/deploy/prepare_release.sh new file mode 100644 index 0000000..459052a --- /dev/null +++ b/deploy/prepare_release.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +echo "prepare release" +cd .. +docker-compose -f docker-compose.yml -f docker-compose.prod.yml stop +docker-compose -f docker-compose.yml -f docker-compose.prod.yml rm -f +docker-compose -f docker-compose.yml -f docker-compose.prod.yml pull +docker-compose -f docker-compose.yml -f docker-compose.prod.yml build +docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d +echo "run tests" +docker exec lesspass_frontend_1 npm run test +docker exec lesspass_backend_1 python manage.py test + +echo "build frontend" +cd frontend +npm run build + +cd .. +git status +cd deploy \ No newline at end of file