Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Automate dev/build in Live environment


3 Posts   1005 Views


19 January 2011 at 7:44am 32 Posts

Is there any way I can automate dev/build in Live environment?

My situation is that I have automated deployment processes for our live servers that rsync a tag of a project repo, and also perform other functions like chmod'ing directories, flushing caches, etc.

I'd also like the deploy process to be able to run a dev/build at the end of the deploy, but in the live environment this forces redirect to the login page. Is there any other way to do this? eg. include a 'secret' param on the URL to allow it, or allow it only from a specific IP. Does anything like this exist, or will I need to hack it into the core or extend something?


19 January 2011 at 8:16am Forum Moderator, 1796 Posts

dev/build only needs a login if the site is in live mode, you could set the dev mode via a config file... update that file automatically before the dev/build to "dev", then update it again when the page contain "Database Built!" (or whatever it says) - to avoid the any error in the build. Hope this helps.


19 January 2011 at 8:38am Forum Moderator, 474 Posts

You could use [url=]sake[/url].

Assuming you're in the root directory of your SilverStripe installation, running sake dev/build will build the database for you, and doesn't require a login or for the site to be in dev mode.