Commit 289aeeb0 authored by Nicolas Joyard's avatar Nicolas Joyard

Update openshift deployment scripts

parent 699c1dc3
......@@ -8,29 +8,26 @@ set -xe
source ${OPENSHIFT_HOMEDIR}app-root/runtime/dependencies/python/virtenv/bin/activate
pip install -U pip
pip install -Ue ${OPENSHIFT_REPO_DIR}
mkdir -p ${OPENSHIFT_DATA_DIR}media
pushd ${OPENSHIFT_REPO_DIR}
if [ -f ${OPENSHIFT_DATA_DIR}sentry ]; then
pip install raven
./manage.py raven test
else
echo ${OPENSHIFT_DATA_DIR}sentry does not exist, not setting up raven.
fi
python ${OPENSHIFT_REPO_DIR}manage.py migrate --noinput
PATH="${OPENSHIFT_DATA_DIR}node/bin:$PATH"
HOME=$OPENSHIFT_DATA_DIR
CI=true
bin/install_client_deps.sh
mkdir -p wsgi
./manage.py collectstatic --noinput
./manage.py compress
popd
if [ -f ${OPENSHIFT_DATA_DIR}sentry ]; then
pip install raven
fi
mkdir -p ${OPENSHIFT_DATA_DIR}media
mkdir -p ${OPENSHIFT_REPO_DIR}wsgi/static/media
ln -sf ${OPENSHIFT_DATA_DIR}media ${OPENSHIFT_REPO_DIR}wsgi/static/media
ln -sf ${OPENSHIFT_DATA_DIR}compress/CACHE ${OPENSHIFT_REPO_DIR}wsgi/static/collected/CACHE
bin/install_client_deps.sh
mkdir -p wsgi/static
[ -f memopol/local_settings.py ] && rm memopol/local_settings.py
cp .openshift/local_settings.py memopol/local_settings.py
./manage.py migrate --noinput
./manage.py collectstatic --noinput
./manage.py compress
ln -sf ${OPENSHIFT_DATA_DIR}media wsgi/static/media
ln -sf ${OPENSHIFT_DATA_DIR}compress/CACHE wsgi/static/collected/CACHE
popd
"""
Memopol local settings for Openshift.
"""
import os
DATA_DIR = os.environ['OPENSHIFT_DATA_DIR']
LOG_DIR = os.environ['OPENSHIFT_LOG_DIR']
PUBLIC_DIR = os.path.join(os.environ['OPENSHIFT_REPO_DIR'], 'wsgi/static')
DATABASES = {
'default': {
'NAME': os.environ['OPENSHIFT_APP_NAME'],
'USER': os.environ['OPENSHIFT_POSTGRESQL_DB_USERNAME'],
'PASSWORD': os.environ['OPENSHIFT_POSTGRESQL_DB_PASSWORD'],
'HOST': os.environ['OPENSHIFT_POSTGRESQL_DB_HOST'],
'PORT': os.environ['OPENSHIFT_POSTGRESQL_DB_PORT'],
'ENGINE': 'django.db.backends.postgresql_psycopg2',
}
}
ALLOWED_HOSTS = [
os.environ['OPENSHIFT_APP_DNS'],
]
SITE_ID = 1
SITE_NAME = 'Memopol'
SITE_DOMAIN = os.environ['OPENSHIFT_APP_DNS']
ORGANIZATION_NAME = 'Memopol'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment