Deploy this app to a DIY cartridge. It uses a customized version of the cartridge openshift-diy-nginx-php (https://github.com/boekkooi/openshift-diy-nginx-php).
- Install rhc and run
rhc setup
- Navigate to the project directory
- Run
rhc show-app <APPLICATION_NAME>
, note the git repository address - Run
git remote add openshift <GIT_REPOSITORY_ADDRESS>
Make sure all changes are commited, then run git push -f openshift <LOCAL_BRANCH_NAME>:master
On the first deploy,
- Run
rhc ssh <APPLICATION_NAME>
- Run
cd app-root/repo
- Run
php artisan migrate
to create tables. You might need to force the migration on production. - Move existing data, if any.
Data is saved in a database named with the same name as the Openshift database by default.
Upload all existing data (profile pictures etc.) to app-root/data/storage
.
To set the application environment between development/production, run rhc env set APPLICATION_ENV=development
, and then restart the application using rhc app-restart <APPLICATION_NAME>
- Encryption key errors: make sure the app key is set properly (length must be exactly 32 chars).
- MySQL errors: try running
php artisan cache:clear
andphp artisan config:cache
manually to rebuild Laravel configuration according to the current Openshift environment variables