On 01-04-2011 13:49, Lee Hambley wrote:
Márcio,
Where can I see some examples about mysql syncronization for a
non-rails application?
Rails uses a migrations syntax, in a nut-shell, this works like
001-create-table-one.rb, 002-create-table-two.rb,
003-change-table-one.rb, each one is tracked, and if `003` hasn't been
run, it gets run… that's all there is to it, they don't preserve data
(unless you write them carefully) and it's not a MySQL feature or
something. The Rails method works across databes… supporting MySQL,
PostgreSQL, etc.. it's a pretty naïve implementation, but it works well.
Perhaps your framework gives you something, if not you might want to
look at `cap web:disable` and `cap web:enable` - to (also naïeve)
tasks for copying a template "maintenance" page into place whilst you
do work that requires some downtime (or a few minutes on a quiet DB)
Well, I'm not sure if this helps us somehow, but I've put the database
schema on a file, using a git hook.
Hopping that, by doing this, I can have my local and remote database
syncronized (not the data, only schema) and that, I will not need
Capistrano there.
Not sure of this, since I've nothing tested yet.
Regarding assets between deploys, there's a variable called
:shared_children - you set it to an array of the `shared between
release` directories, this defaults to something like log, config,
tmp, etc - these are documented here:
https://github.com/capistrano/capistrano/blob/master/lib/capistrano/recipes/deploy.rb#L50
Put whatever directories you need in here, then at first/early deploy
time, make sure your assets are in :deploy_to/shared/whatever-directory/
I don't recall writing anything about assets. (my English is so poor
that if someone uses synonymous, without pointing them out, I will
probably not get (anyway, that's my issue).
But, as a bonus, I now understand what shared directory means! 'shared
between release' (Ignoring my lack of knowledge in English matters, and
if I'm allowed I would called it "preserve").
Anyway, since I use a :remote_cache deploy, I'm deploying only the
committed files.
This being said, I probably don't need to use the shared directory to
deal with "assets". (correct?).
If all the above is correct, two questions - taking that I'm using
remote_cache method:
Can I exclude .rb files to be deployed ? If so, what would the command be?
Do I need to exclude .git files or, isn't necessary?
Thanks a lot,
Márcio
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en