Skip to content

Commit 9427e13

Browse files
committed
Typeless changes.
1 parent eac7aaa commit 9427e13

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.openshift/action_hooks/deploy

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# up again. This script gets executed directly, so it could be python, php,
55
# ruby, etc.
66

7-
source $OPENSHIFT_GEAR_DIR/virtenv/bin/activate
7+
cartridge_type="python-2.6"
8+
source $OPENSHIFT_HOMEDIR/$cartridge_type/virtenv/bin/activate
89

910
if [ ! -f $OPENSHIFT_DATA_DIR/sqlite3.db ]
1011
then

README

+6-5
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,18 @@ OpenShift provides several environment variables to reference for ease
2121
of use. The following list are some common variables but far from exhaustive:
2222

2323
os.environ['OPENSHIFT_APP_NAME'] - Application name
24-
os.environ['OPENSHIFT_GEAR_DIR'] - Application dir
2524
os.environ['OPENSHIFT_DATA_DIR'] - For persistent storage (between pushes)
2625
os.environ['OPENSHIFT_TMP_DIR'] - Temp storage (unmodified files deleted after 10 days)
2726

2827
When embedding a database using 'rhc app cartridge add', you can reference environment
2928
variables for username, host and password:
3029

31-
os.environ['OPENSHIFT_DB_HOST'] - DB host
32-
os.environ['OPENSHIFT_DB_PORT'] - DB Port
33-
os.environ['OPENSHIFT_DB_USERNAME'] - DB Username
34-
os.environ['OPENSHIFT_DB_PASSWORD'] - DB Password
30+
If you embed MySQL, then:
31+
32+
os.environ['OPENSHIFT_MYSQL_DB_HOST'] - DB host
33+
os.environ['OPENSHIFT_MYSQL_DB_PORT'] - DB Port
34+
os.environ['OPENSHIFT_MYSQL_DB_USERNAME'] - DB Username
35+
os.environ['OPENSHIFT_MYSQL_DB_PASSWORD'] - DB Password
3536

3637
To get a full list of environment variables, simply add a line in your
3738
.openshift/action_hooks/build script that says "export" and push.

wsgi/openshift/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
MANAGERS = ADMINS
1919

2020
if ON_OPENSHIFT:
21-
# os.environ['OPENSHIFT_DB_*'] variables can be used with databases created
21+
# os.environ['OPENSHIFT_MYSQL_DB_*'] variables can be used with databases created
2222
# with rhc app cartridge add (see /README in this git repo)
2323
DATABASES = {
2424
'default': {

0 commit comments

Comments
 (0)