|
| 1 | +Feel free to change or remove this file, it is informational only. |
| 2 | + |
| 3 | +Repo layout |
| 4 | +=========== |
| 5 | +php/ - Externally exposed php code goes here |
| 6 | +libs/ - Additional libraries |
| 7 | +misc/ - For not-externally exposed php code |
| 8 | +../data - For persistent data (full path in environment var: OPENSHIFT_DATA_DIR) |
| 9 | +deplist.txt - list of pears to install |
| 10 | +.openshift/action_hooks/pre_build - Script that gets run every git push before the build |
| 11 | +.openshift/action_hooks/build - Script that gets run every git push as part of the build process (on the CI system if available) |
| 12 | +.openshift/action_hooks/deploy - Script that gets run every git push after build but before the app is restarted |
| 13 | +.openshift/action_hooks/post_deploy - Script that gets run every git push after the app is restarted |
| 14 | + |
| 15 | + |
| 16 | +Notes about layout |
| 17 | +================== |
| 18 | +Please leave php, libs and data directories but feel free to create additional |
| 19 | +directories if needed. |
| 20 | + |
| 21 | +Note: Every time you push, everything in your remote repo dir gets recreated |
| 22 | +please store long term items (like an sqlite database) in ../data which will |
| 23 | +persist between pushes of your repo. |
| 24 | + |
| 25 | + |
| 26 | +Environment Variables |
| 27 | +===================== |
| 28 | + |
| 29 | +OpenShift Express provides several environment variables to reference for ease |
| 30 | +of use. The following list are some common variables but far from exhaustive: |
| 31 | + |
| 32 | + $_ENV['OPENSHIFT_APP_NAME'] - Application name |
| 33 | + $_ENV['OPENSHIFT_APP_DIR'] - Application dir |
| 34 | + $_ENV['OPENSHIFT_DATA_DIR'] - For persistent storage (between pushes) |
| 35 | + $_ENV['OPENSHIFT_TMP_DIR'] - Temp storage (unmodified files deleted after 10 days) |
| 36 | + |
| 37 | +When embedding a database using 'rhc app cartridge add', you can reference environment |
| 38 | +variables for username, host and password: |
| 39 | + |
| 40 | + $_ENV['OPENSHIFT_DB_HOST'] - DB host |
| 41 | + $_ENV['OPENSHIFT_DB_PORT'] - DB Port |
| 42 | + $_ENV['OPENSHIFT_DB_USERNAME'] - DB Username |
| 43 | + $_ENV['OPENSHIFT_DB_PASSWORD'] - DB Password |
| 44 | + |
| 45 | +To get a full list of environment variables, simply add a line in your |
| 46 | +.openshift/action_hooks/build script that says "export" and push. |
| 47 | + |
| 48 | +deplist.txt |
| 49 | +=========== |
| 50 | + |
| 51 | +A list of pears to install, line by line on the server. This will happen when |
| 52 | +the user git pushes. |
| 53 | + |
| 54 | + |
| 55 | +Additional information |
| 56 | +====================== |
| 57 | + |
| 58 | +Link to additional information will be here, when we have it :) |
0 commit comments