You can use this stack to replace your XAMPP instances. It contains a very basic setup with:
- PHP 8.2
- MariaDB 11.3.2
- PHPMyAdmin 5.2.1
You should only use this for testing/development! It is NOT suitable for production.
- Database:
- Root user: root
- Root password: root
- Secondary user: user
- Secondary user password: user
- Hostname: db
- Data is stored in the
mariadb_data
directory
- PHPMyAdmin:
- Autologin using the credentials above
- PHP:
- Enabled Apache modules: rewrite
- Installed extensions: mysqli, pdo_mysql, pdo
To use the database in your PHP application, you can refer to the database using it's hostname (db). Check the example src/index.php
file.
To run the stack, do the following:
- Download and install Docker for your OS.
- Clone this repo.
$ git clone ... my-web-stack
- Open a Terminal in the directory containing this repo.
$ cd my-web-stack
- Use Docker Compose to run.
$ docker compose up --build
To run in the background you can add the -d
flag to the last command, like this:
$ docker compose up -d --build
Note that you don't need to rebuild the stack every time you change the src
directory.