lanedirt / OGameX

Open-source OGame redesign clone built with Laravel 11.x.
https://main.ogamex.dev
MIT License
59 stars 24 forks source link

Add database management GUI via PhpMyAdmin docker container #441

Closed lanedirt closed 2 weeks ago

lanedirt commented 2 weeks ago

Issue Description

Add a phpMyAdmin Docker container to the development setup in docker-compose.yml for easy database management, with default features for database export/import. Ensure the setup is secure for potential production deployment, allowing for customization based on environment.

Key Requirements

  1. Development Default:
    Enable the phpMyAdmin container by default in the development docker-compose.yml setup.

  2. Production Toggle:
    Keep the phpMyAdmin container disabled in production by default, see docker-compose.prod.yml. Perhaps we could use .env file options to allow server admins to enable or disable phpMyAdmin as needed, ensuring it isn’t exposed unintentionally in development and/or production environments.

  3. Security Enhancements:

    • The current docker setups use default database credentials, see .env.example; improve security by generating unique credentials during the initial Docker setup.
    • Verify that phpMyAdmin access aligns with intended usage and security requirements to avoid data exposure risks.

Note: Document these setup steps and environment-specific configurations for ease of deployment and maintenance.

jackbayliss commented 2 weeks ago

@lanedirt Good idea, but rather than coding it and maintaining it, you could just attach phpmyadmin to the docker setup: https://hub.docker.com/_/phpmyadmin?tab=description (and lock it down to IP etc and user / pass)

And then you can access it and export / import it that way?

lanedirt commented 2 weeks ago

@lanedirt Good idea, but rather than coding it and maintaining it, you could just attach phpmyadmin to the docker setup: https://hub.docker.com/_/phpmyadmin?tab=description (and lock it down to IP etc and user / pass)

And then you can access it and export / import it that way?

Great suggestion! On second thought, you're absolutely right that coding and maintaining this ourselves could add unnecessary complexity. Especially when trying to import a new database while authenticated with a user from the existing database.

I'll update the issue 👍.