|
@ -102,10 +102,10 @@ deploy_prod: venv_check |
|
|
sync_prod_flatpages: venv_check |
|
|
sync_prod_flatpages: venv_check |
|
|
@echo Downloading current version of flatpages from mamweb-prod. |
|
|
@echo Downloading current version of flatpages from mamweb-prod. |
|
|
ssh mam-web@gimli.ms.mff.cuni.cz \
|
|
|
ssh mam-web@gimli.ms.mff.cuni.cz \
|
|
|
"cd /akce/mam/www/mamweb-prod; . env/bin/activate; ./manage.py dumpdata flatpages --indent=2 > flat.json" |
|
|
"cd /akce/mam/www/mamweb-prod; . env/bin/activate; ./manage.py dumpdata flatpages --indent=2 > flat.json; ./fix_json.py flat.json flat_fixed.json" |
|
|
rsync -ave ssh mam-web@gimli.ms.mff.cuni.cz:/akce/mam/www/mamweb-prod/flat.json ./flat.json |
|
|
rsync -ave ssh mam-web@gimli.ms.mff.cuni.cz:/akce/mam/www/mamweb-prod/flat_fixed.json data/flat.json |
|
|
@echo "Applying downloaded flatpages." |
|
|
@echo "Applying downloaded flatpages." |
|
|
./manage.py loaddata flat.json |
|
|
./manage.py loaddata data/flat.json |
|
|
@echo "Done." |
|
|
@echo "Done." |
|
|
|
|
|
|
|
|
# Sync test media directory with production
|
|
|
# Sync test media directory with production
|
|
@ -132,6 +132,7 @@ sync_test_db_aggressive: |
|
|
bash -c "psql mam_test <<< 'DROP OWNED BY \"mam-web\";'" |
|
|
bash -c "psql mam_test <<< 'DROP OWNED BY \"mam-web\";'" |
|
|
pg_restore -c --if-exists -d mam_test dump-prod.sql |
|
|
pg_restore -c --if-exists -d mam_test dump-prod.sql |
|
|
rm dump-prod.sql |
|
|
rm dump-prod.sql |
|
|
|
|
|
bash -c "psql mam_test <<< UPDATE django_site SET name=\'MaMweb (test)\', domain=\'mam-test.ks.matfyz.cz\' WHERE id=1" |
|
|
@echo Done. |
|
|
@echo Done. |
|
|
|
|
|
|
|
|
# Sync test with production
|
|
|
# Sync test with production
|
|
|