Update db nastaveni pro -test a -prod

This commit is contained in:
Tomas Gavenciak 2015-05-26 13:35:14 +02:00
parent 8bf8eb8b23
commit 7ad8a8f88b
3 changed files with 15 additions and 8 deletions

View file

@ -72,6 +72,7 @@ HEAD=`git log --color=never |head -1|sed 's/.*commit //'`
push_test: push_test:
@echo "Checking out commited HEAD (${HEAD}) state at ${TEST_SSH} ..." @echo "Checking out commited HEAD (${HEAD}) state at ${TEST_SSH} ..."
git tag deploy-test-`date +%Y-%m-%d-%H-%M`-${USER}
git push --all git push --all
ssh ${TEST_USER}@${TEST_SERVER} -n -x "\ ssh ${TEST_USER}@${TEST_SERVER} -n -x "\
cd ${TEST_DIR} && \ cd ${TEST_DIR} && \
@ -89,6 +90,7 @@ push_test:
push_prod: push_prod:
@echo "Checking out commited HEAD (${HEAD}) state at ${PROD_SSH} ..." @echo "Checking out commited HEAD (${HEAD}) state at ${PROD_SSH} ..."
git tag deploy-prod-`date +%Y-%m-%d-%H-%M`-${USER}
git push --all git push --all
ssh ${PROD_USER}@${PROD_SERVER} -n -x "\ ssh ${PROD_USER}@${PROD_SERVER} -n -x "\
cd ${PROD_DIR} && \ cd ${PROD_DIR} && \

View file

@ -22,11 +22,12 @@ ALLOWED_HOSTS = ['mam.mff.cuni.cz', 'www.mam.mff.cuni.cz', 'atrey.karlin.mff.cun
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.path.join(BASE_DIR, 'db-prod-temp.sqlite3'), 'NAME': 'mam-prod',
# 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'USER': 'mam',
# 'NAME': 'mam-prod', 'TEST': {
# 'USER': 'mam', 'NAME': 'mam-prod-testdb',
},
}, },
} }

View file

@ -25,9 +25,13 @@ ALLOWED_HOSTS = ['*.mam.mff.cuni.cz']
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.path.join(BASE_DIR, 'db-test.sqlite3'), 'NAME': 'mam-test',
} 'USER': 'mam',
'TEST': {
'NAME': 'mam-test-testdb',
},
},
} }