Browse Source

Update db nastaveni pro -test a -prod

remotes/origin/feincms deploy-prod-2015-05-26-13-53-gavento
Tomas Gavenciak 10 years ago
parent
commit
7ad8a8f88b
  1. 2
      Makefile
  2. 11
      mamweb/settings_prod.py
  3. 10
      mamweb/settings_test.py

2
Makefile

@ -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} && \

11
mamweb/settings_prod.py

@ -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',
},
}, },
} }

10
mamweb/settings_test.py

@ -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',
},
},
} }

Loading…
Cancel
Save