luciddreamz / laravel Goto Github PK
View Code? Open in Web Editor NEWOpenShift QuickStart - Laravel 5.0 Framework
OpenShift QuickStart - Laravel 5.0 Framework
Hi,
When I want to add a custom class to the composer.json my custom class need to implement in config/app.php and after that need to artisan vendor:publish But when I want to commit my application, then I receive this message:
I can resolve this error using this method:
That's all
Regards Payam
Hi,
I am new to openshift and i have a problem in deployment. I've pushed the updates to openshift repo by simply pushing to the master branch. It seems that the updates wasn't deployed properly. How do i make sure that all the updates are part of the deployment? I already added "php artisan cache:clear" on deploy action hook didn't help at all.
How do check the last commit in the server? Thanks in advance.
It's been a long time (1+year ago) since I updated my app. Now I'm trying to deploy my updates and I've encountered the error below. I suspect that this error was caused by the outdated composer, so tried updating it by adding a script in post_deploy and deploy action_hooks. Unfortunately, it didn't work. Can you please help me with this error? Thanks in advance!
Composer update script
export MY_PHPCOMPOSER=$OPENSHIFT_DATA_DIR/composer.phar
# if composer not exists, download
if [ ! -f $MY_PHPCOMPOSER ]; then
cd $OPENSHIFT_DATA_DIR
echo "Downloading composer..."
php -r "readfile('https://getcomposer.org/installer');" | php
fi
$MY_PHPCOMPOSER -n -q self-update
cd $OPENSHIFT_REPO_DIR
# install
php -dmemory_limit=1G $MY_PHPCOMPOSER install
Deploy Error
Stopping PHP 5.4 cartridge (Apache+mod_php)
Waiting for stop to finish
Waiting for stop to finish
Stopping MySQL 5.5 cartridge
Stopping PHPMyAdmin cartridge
Waiting for stop to finish
Waiting for stop to finish
Stopping Cron cartridge
Repairing links for 1 deployments
Building git ref 'develop', commit b3a5587
Checking .openshift/pear.txt for PEAR dependency...
Ignoring composer.lock file (development mode)
Checking composer.json for Composer dependency...
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/var/lib/openshift/563b289089f5cfb439000159/php /usr/bin/composer self-update" to get the latest version.
Loading composer repositories with package information
Updating dependencies (including require-dev)
[RuntimeException]
Could not load package intervention/image in http://packagist.org: [UnexpectedValueException] Could not parse version constraint 4.x.x: Invalid version s tring "4.x.x"
[UnexpectedValueException]
Could not parse version constraint 4.x.x: Invalid version string "4.x.x"
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [ --no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [package s1] ... [packagesN]
Starting MySQL 5.5 cartridge
Starting PHPMyAdmin cartridge
Starting Cron cartridge
Starting PHP 5.4 cartridge (Apache+mod_php)
Application directory "public/" selected as DocumentRoot
An error occurred executing 'gear deploy' (exit code: 1)
Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/563b289089f5cfb439000159/php
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.38.7/lib/openshift-origin-node/model/v2_cart_model.rb:1387:in `block in do_control_with_di rectory'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.38.7/lib/openshift-origin-node/model/v2_cart_model.rb:1175:in `process_cartridges'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.38.7/lib/openshift-origin-node/model/v2_cart_model.rb:1350:in `do_control_with_directory'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.38.7/lib/openshift-origin-node/model/v2_cart_model.rb:1197:in `do_control'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.38.7/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb:586:in `build'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.38.7/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb:458:in `post_receive'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.38.7/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb:1035:i n `deploy'
/usr/bin/gear:436:in `block (3 levels) in <main>'
/usr/bin/gear:75:in `do_command'
/usr/bin/gear:423:in `block (2 levels) in <main>'
/opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
/opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:74:in `run!'
/opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/delegates.rb:11:in `run!'
/opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/import.rb:10:in `block in <top (required)>'
The deploy hook is not setting DB_DATABASE, DB_USERNAME, etc. It only sets the driver.
Not using this command is commonly use on shared hosting application but is this also possible to off on the cartridge. I just need this to one of my application.
Hi,
After deploying the app, all the uploaded images were deleted or maybe moved to somewhere else. I'm not sure what's happening when i deploy something.
How do I automatically link the uploads folder to the openshift data dir? or better if the files on the upload folders are preserved. I've tried adding a link command on deploy script but sadly it didn't work. Can you please assist me in setting this up. Thanks in advance!
ln -sf ${OPENSHIFT_DATA_DIR}public/uploads ${OPENSHIFT_REPO_DIR}public/uploads
ln -sf ${OPENSHIFT_DATA_DIR}public/cards ${OPENSHIFT_REPO_DIR}public/cards
Thanks
Hi,
Thank you for contributing this.
I was wondering if you have any plans to upgrade to Laravel 5.1? It would also a PHP5.6 upgrade in the cartridge as well I think.
Thanks in advance.
resolved
First of all, nice work ! It was really easy to deploy my Laravel app on Openshift with your cartridge, so thanks for that π
In order to fully automatize the deployment process, it would be cool to add a rule to execute npm
tasks such as gulp
or bower
.
I added my npm tasks in the build hook, but I have the well knew rights error:
npm ERR! Error: EACCES, mkdir '/var/lib/openshift/XXXXXXX/.npm'
npm ERR! { [Error: EACCES, mkdir '/var/lib/openshift/XXXXXXX/.npm']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/var/lib/openshift/XXXXXXX/.npm' }
npm ERR! Please try running this command again as root/Administrator.
I tried to figure out how I can enable npm
on my gear, or change npm
's default temp folders but I didn't succeed so far.
There is a better and simpler way to do that directly in the Laravel Cartridge ?
Today I try to use a "intervention/image": "^2.3.*", whe I use "composer update" I have this error ( Could not parse version constraint 4.x.x: Invalid version string "4.x.x"), I read about this and found itΒ΄s because the old composer version (1.0-dev 2015-03-09 23:06:06). The file composer.phar can be updated?
I can't see 'composer update' command anywhere in the action_hooks directory. Is composer supported? I used laravel 4 with the following 'build' action hook.
export COMPOSER_HOME="$OPENSHIFT_DATA_DIR/.composer"
if [ ! -f "$OPENSHIFT_DATA_DIR/composer.phar" ]; then
curl -s https://getcomposer.org/installer | php -- --install-dir=$OPENSHIFT_DATA_DIR
else
php $OPENSHIFT_DATA_DIR/composer.phar self-update
fi
( unset GIT_DIR ; cd $OPENSHIFT_REPO_DIR ; php $OPENSHIFT_DATA_DIR/composer.phar install )
But i could'nt find a similar one here. So how does it support composer?
And please explain the settings of .env file configuration. If i want to add my data to remote .env file, how should i do it. I could'nt understand its working here. Its in .openshift directory for remote server. But how laravel will use it to get the required data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.