We (a small team of 3 trying out Akelos with great joy so far) are
trying to find documentation about how to pass from the development
mode to the test, then the production mode.
So far, the documentation we found says we should change an Akelos
constant (I forgot the name already) from 'development' to
'production', yet doing this doesn't seem to change anything.
Is there a detailed description of how to go from the dev mode to the
production mode, somewhere?
I suppose guidelines of the type:
- develop project Z
- copy the Z directory to a new one
- change the constant to 'production'
- do 1
- do 2
- do 3
... would be enough, it's just that when it's not explained it makes
it super complicated to imagine what clever mechanism you are using.
Yannick
First step, use a Version Control System like Subversion or Git.
Don't version config/config.php
When developing the app (on your local machine) set on config/config.php
!defined('AK_ENVIRONMENT') && define('AK_ENVIRONMENT',
'development');
Web requests you make will run against the development DB.
Once you're done with local changes, commit to your repository and
checkout on the production machine where you will need to set
!defined('AK_ENVIRONMENT') && define('AK_ENVIRONMENT',
'production');
Regarding Unit Tests, any time you call
./scritp/test unit
the environment will be set for you to 'testing'.
The right thing to do is to locally test before committing.
We still don't have a remote deployment script, so you will need to
run migrations on the remote server if there are database scheme
changes.
I hope it's now clearer.
Cheers,
Bermi
development (local) copies set the constant AK_ENVIRONMENT
I've asked one of our team members (Daniel) to post that on the wiki so it
is available for a wider public.
The best way to make sure some (selected) static DB data used in the test
environment is passed on to the production environment is to put them in the
migrations as well, right? (or is there any other kind of neat Akelos technique
to export the data from one dev table to one prod table, other than using SQL
clients directly?)
Yannick