Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single container with multiple databases #99

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kane-c
Copy link

@kane-c kane-c commented Jan 25, 2017

I've really wanted this plugin to be able to this for a long time. When I found @josegonzalez's helpful outline in dokku/dokku-redis#64 (Single Container Usage), I decided to give it a go.

Usage is like this:

dokku postgres:create db
dokku postgres:create-database db app --database db_name --user user_name
dokku postgres:link db app --database db_name --user user_name

It's also possible to unlink in the same way as linking above, and the same goes for destroying a single database with postgres:destroy-database.

See also: #49

@josegonzalez
Copy link
Member

Can you reimplement this as a pr to my redis pr? That way I can apply this uniformly everywhere.

@kevinresol
Copy link

Any updates?

@jsuchal
Copy link

jsuchal commented Sep 22, 2017

This is great, what is the blocker here (besides the obvious rebase/merge conflict?)

@josegonzalez
Copy link
Member

Thats the blocker.

@lostb1t
Copy link

lostb1t commented Feb 6, 2018

Any updates? @kane-c Need help wrapping this up?

@pavolzbell
Copy link

Any updates on this? Also, why #138 closed? Is it a no-go?

@josegonzalez
Copy link
Member

@pavolzbell a few things:

  • if there is an update, it would be posted.
  • it hasn't been reviewed heavily since it needs a rebase.
  • the other user closed their PR on their own. I do not know why, not up to me.

@pynixwang
Copy link

I can not see the benefit of this.

@josegonzalez
Copy link
Member

@pynixwang You don't need to see the benefit of running multiple databases in a single container. Some of our users might do so in order to use fewer resources. Thats enough for me.

@pynixwang
Copy link

@josegonzalez yes. reduce a very very little resource. but increase complexity

@kane-c
Copy link
Author

kane-c commented Oct 8, 2018

For my use case - multiple sites on a EC2 micro instance - memory is very limited so having a single Postgres server with multiple databases is a lot better than one Postgres server per database. Add Docker into the mix as well and it's a lot of overhead I'd rather avoid if possible.

@josegonzalez
Copy link
Member

@kane-c if you have a chance to rebase this, I might be able to just take a look and potentially do the migration to the redis service/others.

@kane-c
Copy link
Author

kane-c commented Oct 8, 2018

@josegonzalez I'll have some time over the next few days, I'll see what I can do.

@pdomagala
Copy link

@kane-c Any updates? Do you need some help?

@kane-c
Copy link
Author

kane-c commented Jan 13, 2019

@pdomagala Sorry, life got in the way! If you would like to help then please do!

@ezra-obiwale
Copy link

ezra-obiwale commented Jun 23, 2020

Can you reimplement this as a pr to my redis pr? That way I can apply this uniformly everywhere.

@josegonzalez What exactly needs to be done to have this feature merged? I'll put in the time to fix it, if I can.

What Redis PR?

@josegonzalez
Copy link
Member

Lets ignore redis for now.

The feature needs to be rebased, and in a way that makes it easy to apply the change to all datastore plugins. Ideally you apply it here and maybe memcached? Or some other datastore that doesn't use users in the same way.

Generally speaking, I should only need to write a few custom functions in the functions file to add this to every plugin. If the functionality shouldnt be supported, there should be a way to turn it off (maybe via a variable in the the config file?).

Might be good to reach out to me on slack (I'm savant there) so we can discuss it further :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants