|
@ -60,7 +60,8 @@ schema_all.pdf: |
|
|
|
|
|
|
|
|
# Deploy to current *mamweb-test* directory
|
|
|
# Deploy to current *mamweb-test* directory
|
|
|
deploy_test: |
|
|
deploy_test: |
|
|
@if [[ `pwd` != "/akce/MaM/WWW/mamweb-test" ]]; then echo "Only possible in /akce/MaM/WWW/mamweb-test"; exit 1; fi |
|
|
@if [ ${USER} != "www-mam" ]; then echo "Only possible by user www-mam"; exit 1; fi |
|
|
|
|
|
@if [ `pwd` != "/akce/MaM/WWW/mamweb-test" ]; then echo "Only possible in /akce/MaM/WWW/mamweb-test"; exit 1; fi |
|
|
@echo "Installing version from origin/master ..." |
|
|
@echo "Installing version from origin/master ..." |
|
|
git pull origin master |
|
|
git pull origin master |
|
|
git clean -f |
|
|
git clean -f |
|
@ -68,13 +69,15 @@ deploy_test: |
|
|
./manage.py migrate |
|
|
./manage.py migrate |
|
|
./manage.py collectstatic --noinput |
|
|
./manage.py collectstatic --noinput |
|
|
(chown -Rf :mam . || true ) |
|
|
(chown -Rf :mam . || true ) |
|
|
(chmod -Rf g+rwX . || true ) |
|
|
(chmod -Rf g+rX . || true ) |
|
|
|
|
|
(chmod -Rf g+rwX ./media/ || true ) |
|
|
touch mamweb/wsgi.py |
|
|
touch mamweb/wsgi.py |
|
|
@echo Done. |
|
|
@echo Done. |
|
|
|
|
|
|
|
|
# Deploy to current *mamweb-prod* directory
|
|
|
# Deploy to current *mamweb-prod* directory
|
|
|
deploy_prod: |
|
|
deploy_prod: |
|
|
@if [[ `pwd` != "/akce/MaM/WWW/mamweb-prod" ]]; then echo "Only possible in /akce/MaM/WWW/mamweb-prod"; exit 1; fi |
|
|
@if [ ${USER} != "www-mam" ]; then echo "Only possible by user www-mam"; exit 1; fi |
|
|
|
|
|
@if [ `pwd` != "/akce/MaM/WWW/mamweb-prod" ]; then echo "Only possible in /akce/MaM/WWW/mamweb-prod"; exit 1; fi |
|
|
@echo "Backing up production DB ..." |
|
|
@echo "Backing up production DB ..." |
|
|
( cd .. && ./backup_prod_db.sh ) |
|
|
( cd .. && ./backup_prod_db.sh ) |
|
|
@echo "Installing version from origin/stable ..." |
|
|
@echo "Installing version from origin/stable ..." |
|
@ -84,7 +87,8 @@ deploy_prod: |
|
|
./manage.py migrate |
|
|
./manage.py migrate |
|
|
./manage.py collectstatic --noinput |
|
|
./manage.py collectstatic --noinput |
|
|
(chown -Rf :mam . || true ) |
|
|
(chown -Rf :mam . || true ) |
|
|
(chmod -Rf g+rwX . || true ) |
|
|
(chmod -Rf g+rX . || true ) |
|
|
|
|
|
(chmod -Rf g+rwX ./media/ || true ) |
|
|
touch mamweb/wsgi.py |
|
|
touch mamweb/wsgi.py |
|
|
@echo Done. |
|
|
@echo Done. |
|
|
|
|
|
|
|
|