From 7ad8a8f88b43e51398d28295ef8ae2a36b836e86 Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Tue, 26 May 2015 13:35:14 +0200 Subject: [PATCH] Update db nastaveni pro -test a -prod --- Makefile | 2 ++ mamweb/settings_prod.py | 11 ++++++----- mamweb/settings_test.py | 10 +++++++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 62bb504e..d42be96a 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,7 @@ HEAD=`git log --color=never |head -1|sed 's/.*commit //'` push_test: @echo "Checking out commited HEAD (${HEAD}) state at ${TEST_SSH} ..." + git tag deploy-test-`date +%Y-%m-%d-%H-%M`-${USER} git push --all ssh ${TEST_USER}@${TEST_SERVER} -n -x "\ cd ${TEST_DIR} && \ @@ -89,6 +90,7 @@ push_test: push_prod: @echo "Checking out commited HEAD (${HEAD}) state at ${PROD_SSH} ..." + git tag deploy-prod-`date +%Y-%m-%d-%H-%M`-${USER} git push --all ssh ${PROD_USER}@${PROD_SERVER} -n -x "\ cd ${PROD_DIR} && \ diff --git a/mamweb/settings_prod.py b/mamweb/settings_prod.py index 9a93aa8a..0eede77c 100644 --- a/mamweb/settings_prod.py +++ b/mamweb/settings_prod.py @@ -22,11 +22,12 @@ ALLOWED_HOSTS = ['mam.mff.cuni.cz', 'www.mam.mff.cuni.cz', 'atrey.karlin.mff.cun DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db-prod-temp.sqlite3'), -# 'ENGINE': 'django.db.backends.postgresql_psycopg2', -# 'NAME': 'mam-prod', -# 'USER': 'mam', + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'mam-prod', + 'USER': 'mam', + 'TEST': { + 'NAME': 'mam-prod-testdb', + }, }, } diff --git a/mamweb/settings_test.py b/mamweb/settings_test.py index 202cd2e7..50bff36e 100644 --- a/mamweb/settings_test.py +++ b/mamweb/settings_test.py @@ -25,9 +25,13 @@ ALLOWED_HOSTS = ['*.mam.mff.cuni.cz'] DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db-test.sqlite3'), - } + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'mam-test', + 'USER': 'mam', + 'TEST': { + 'NAME': 'mam-test-testdb', + }, + }, }