Project

General

Profile

Multiple client schemas per database with Redmine

Added by Luan Nguyen over 13 years ago

Hi Everyone,

I am not sure if Rails would be able to do this, but I would like to use different clients with different schemas in the same database.

Have anyone done something like this before? Please give me advice if you have.

Thanks,
Luan


Replies (8)

RE: Multiple client schemas per database with Redmine - Added by Felix Schäfer over 13 years ago

I'm not sure what you're asking about, could you try to be more specific or even give an example?

RE: Multiple client schemas per database with Redmine - Added by Luan Nguyen over 13 years ago

Yes, sure. For example: I have 2 clients using with my redmine hosting site.
I wanted each client using different schemas (databases) like redmine1, redmine2 in mysql. Therefore, they are independent each other so that client1 would not see projects of client2 vice versus.

Another example is that I have seen few hosting redmine companies, if I sign up with them. How would they separate between my projects with other clients?

I think it's easier for me right now to separate each client by using different databases, but then I don't know if I have to use sub-domain to separate for each client.

Please let me know if you have any questions.

Thanks,
Luan

RE: Multiple client schemas per database with Redmine - Added by Felix Schäfer over 13 years ago

No, you need a database for each instance of redmine you want to use, rails gives you environments though, which essentially allows you to say: environment1 uses database1 and email_config1, environment2 uses database2 and email_config2 and so on. The problem with redmine though is that all files (attachments) are save in the files/ directly, regardless of the environment, so there might be collisions (though unlikely because the filenames on disk are timestamped) or even security issues with that.

I think the safest way really is to install one codebase per instance, redmine isn't that big that it makes a big difference in the end.

RE: Multiple client schemas per database with Redmine - Added by Luan Nguyen over 13 years ago

OK, that sounds great, but I don't know how to run different web servers for each redmine instance. Any helps on that?

Thanks,
Luan

RE: Multiple client schemas per database with Redmine - Added by Felix Schäfer over 13 years ago

What do you use to server the one you already have?

RE: Multiple client schemas per database with Redmine - Added by Luan Nguyen over 13 years ago

I use Ubuntu 10.4 and Nginx + thin.

For example: I am running one instance of redmine with redmine mysql database
with 2 servers running for this instance.

127.0.0.1:3000
127.0.0.1:3001

If I wanted to add another instance of redmine with redmine2 mysql database, what do I need to setup to run the second redmine instance?

Thanks,
Luan

RE: Multiple client schemas per database with Redmine - Added by Felix Schäfer over 13 years ago

Fire up more thins for the second instance and point your second vhost or URI to it.

I'd really recommend you read some documentation and understand what you are doing and (more importantly) why you are doing it.

RE: Multiple client schemas per database with Redmine - Added by Luan Nguyen over 13 years ago

Thanks for your help, Felix.

I really appreciate your time.

Luan

    (1-8/8)