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

Add database management #445

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

jackbayliss
Copy link
Contributor

@jackbayliss jackbayliss commented Nov 10, 2024

This closes #441

Default Setup

I've added the default phpmyadmin setup into the dev docker setup, and the default port will be 8080 - this can be edited.

Production

For the production setup, rather than leaving it out for production based on env, I've included it, but I've added a volume line that essentially locks it down by IP, this means that essentially no one can access it, unless its the IP address in the .htaccess ie for example Allow from 1.1.1.1.
This should then give you the ability for it to setup and work, but be locked down to your own IP address etc, so not just anyone can access it.

If you try to access it without the right IP, you get the following - therefore if you alter this in production, it'll only be locked to you allowing easy import and export ability :
image

You'd login with the DB / PASS the same as laravel.

was testing on the dev one, forgot to replicate it to prod, oops
@lanedirt
Copy link
Owner

lanedirt commented Nov 11, 2024

Hi @jackbayliss,

Thanks for looking into this. I think this is a nice solution with the conditional .htaccess so access is disabled by default for production but the server admin can open it up if they want. Good idea! 👍

As a bonus I think it would be good if we could update the README.md file to include information about the new exposed port 8080 and how the .htaccess file works for restricting access production.

My idea would be to add a small sentence to these parts:

Note: The default setup binds to ports 80/443. Modify docker-compose.yml if needed.

E.g. we could make it this for the development section:

Note: The default setup binds to ports 80/443. PhpMyAdmin is also included for database management and is bound to port 8080. Modify docker-compose.yml if needed.

And this for the production section:

Note: The default setup binds to ports 80/443. PhpMyAdmin is also included for database management and is bound to port 8080, however to access it you need to explicitly specify your IP addresses via ./docker/phpmyadmin/.htaccess for safety purposes. Modify docker-compose.yml or .htaccess if needed.

What do you think about this?

@jackbayliss
Copy link
Contributor Author

@lanedirt All done, I've had to do it on my phone so please do adjust if anything is off :)

@lanedirt
Copy link
Owner

Looks good to me, thanks for updating the readme. Merging!

@lanedirt lanedirt merged commit a5c5428 into lanedirt:main Nov 11, 2024
6 checks passed
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.

Add database management GUI via PhpMyAdmin docker container
2 participants