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, Ed, biapar, Willr, Ingo, swaiba

Automate dev/build in Live environment

Go to End

3 Posts   1640 Views


32 Posts

19 January 2011 at 7:44am

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?


Forum Moderator, 1899 Posts

19 January 2011 at 8:16am

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.


Community Member, 473 Posts

19 January 2011 at 8:38am

You could use sake.

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.