Search by

drago-ex / project-docker-db

accgit

The package extends the Drago Project to include mysqli database on docker.

Package info

github.com/drago-ex/project-docker-db

Type:drago-tools-resource

pkg:composer/drago-ex/project-docker-db

Statistics

Installs: 126

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.0 2026-10-31 14:45 UTC

This package is auto-updated.

Last update: 2026-10-31 15:52:04 UTC


README

The package extends Drago Project with a MySQL database in Docker.

PHP version Coding Style

Requirements

Installation

composer require drago-ex/project-docker-db

Files copied into the project

The files are copied into the project by drago-ex/project-tools, as set in extra.drago-tools of this package's composer.json.

The package does the following

  • Copies a configured Neon file with database settings preconfigured for Docker.
  • Adds Docker files for database setup.
  • Integrates Dibi for database interaction.

The data of the database are in the Docker volume db-data, which is much faster than a directory of the project on Windows. docker compose down keeps it, docker compose down --volumes deletes the data.

The database connection is in local/db.neon. The local/ directory is mounted into the container, so what the application writes there (e.g. an installer) outlasts a new image; keep it out of git.

Development only

The database user and passwords (super/pass, root root) in docker-compose.override.yaml and local/db.neon are for local development. Change them before the setup runs anywhere else (the docker:production script uses the same files).

The database listens only on 127.0.0.1:6033, so tools on your computer can connect to it. To publish it on every interface, set DB_PORT=6033; Docker bypasses firewalls such as ufw, so never do so on a server.

Remember

The package extends the basic PHP Docker server with a MySQL database. Install and build the base Docker setup first, then add this database package and rebuild Docker.

https://github.com/drago-ex/project-docker