Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to execute the ruckusing-migration through http request #160

Open
Gampesh opened this issue Jul 1, 2015 · 4 comments
Open

Comments

@Gampesh
Copy link

Gampesh commented Jul 1, 2015

Is it possible to execute the migration command through http request?
Actually i wanted to create some services which will update the database based on the parameter i.e. task, ENV.

@kevcam4891
Copy link
Contributor

Its definitely possible, but as for implementation, it depends on your
framework. CakePHP and other frameworks make it VERY easy to do this.
Just map a url to a specific controller/action.

If you do not use a framework, you will have to map a URL request to
your apache installation which should fire a php script.

However apache ultimately reaches and executes the PHP, that script
should contain code that exec()'s the migration update command.

Gampesh mailto:[email protected]
July 1, 2015 at 8:43 AM

Is it possible to execute the migration command through http request?
Actually i wanted to create some services which will update the
database based on the parameter i.e. task, ENV.


Reply to this email directly or view it on GitHub
#160.

@Gampesh
Copy link
Author

Gampesh commented Jul 1, 2015

Thanks for the reply.
I am new to this and I am not sure how to map url. Also Ruckusing_FrameworkRunner method require $argv which is a global variable. So when I would do HTTP request $argv does not contain the values of post or get request.
I am trying to use it in Zend Framework 1.
any help would be appreciated.

@silverslice
Copy link
Contributor

As mentioned in #134

Currently the CLI is the primary interface. But it should be straight-forward enough to write your own web wrapper around the tool.

You can manually build arguments in your script and then run ruckus with exec() function in php something like this:

exec('./bin/ruckus.php db:migrate', $output);
echo implode('<br>', $output);

@Gampesh
Copy link
Author

Gampesh commented Jul 3, 2015

Thanks let me try this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants