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

Allow direct port expose of MySQL #239

Open
AdrianPop opened this issue Oct 12, 2022 · 0 comments
Open

Allow direct port expose of MySQL #239

AdrianPop opened this issue Oct 12, 2022 · 0 comments

Comments

@AdrianPop
Copy link

Description of problem

I have a small app which needs to have the DB on a different host than the code. Due to this, I've installed dokku-mysql on host A and the backend app on host B.
The problem is with the expose command which is done through ambassador or socat. This is painfully slow. I mean a page which would load in 300ms, loads in 4-5s if using expose.

Due to this I've searched for ways to replace socat and ended up digging through bash commands

How reproducible

Steps to Reproduce

  1. dokku mysql:create db - all ports are closed
  2. dok mysql:create db --shm-size "64mb -p 9089:3306" - port 3306 is mapped to 9089

Actual Results

  • all ports are closed

Expected Results

  • some ports open

Additional information

  • Somehow I'm using "bash injection" (like sql injection). The $SHM_SIZE param from here is the only param that comes unaltered. And I'm adding the default shm-size for docker and add extra params for docker run command.

Open discussion

I think by using socat, there's no protection level compared to a simple port-expose.
If you agree that this would be a nice feature, I could create a PR.
My solution would be:

  • add in --create-flags another option to be provided to docker run like -d|--docker-options with free text. This way I can decide to use -P or --port 1234:3306 or simply add any other docker run options there.

What do you think?

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

No branches or pull requests

2 participants