- PHP 96.8%
- CSS 2.3%
- Shell 0.8%
- Dockerfile 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| adminer-plugins | ||
| assets | ||
| .dockerignore | ||
| .gitignore | ||
| .htaccess | ||
| adminer.php | ||
| build.sh | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| README.md | ||
| update.sh | ||
Adminer
Database management tool based on Adminer.
Supports MySQL, MariaDB, PostgreSQL, and SQLite.
Usage
Clone
git clone https://git.paucapo.com/server/adminer.git
Serve the directory with any PHP 8.4 web server and open adminer.php.
Docker
docker run -p 8080:80 git.paucapo.com/server/adminer
Then open http://localhost:8080.
Docker Compose
services:
adminer:
image: git.paucapo.com/server/adminer
container_name: adminer
restart: unless-stopped
#network_mode: host
ports:
- 8080:80
#environment:
# - UPLOAD_MAX_FILESIZE=2G
volumes:
- ./servers.php:/var/www/html/servers.php
Then open http://localhost:8080 (or http://localhost:80 if using network_mode: host).
Warning: When using
network_mode: host, PHP's MySQL driver treatslocalhostas a Unix socket path, which fails inside the container. Add this to the end ofservers.phpto force TCP connections:if (isset($_POST['auth']['server']) && ($_POST['auth']['server'] === 'localhost' || $_POST['auth']['server'] === '')) { $_POST['auth']['server'] = '127.0.0.1'; } if (isset($_GET['server']) && ($_GET['server'] === 'localhost' || $_GET['server'] === '')) { $_GET['server'] = '127.0.0.1'; }
Environment variables
| Variable | Default | Description |
|---|---|---|
UPLOAD_MAX_FILESIZE |
2G |
PHP upload_max_filesize and post_max_size |
docker run -p 8080:80 -e UPLOAD_MAX_FILESIZE=512M git.paucapo.com/server/adminer
PHP's session.upload_progress is disabled, so imports work but don't show a progress bar.
Server configuration
To restrict which database systems and servers can be accessed, mount a servers.php file:
docker run -p 8080:80 -v ./servers.php:/var/www/html/servers.php git.paucapo.com/server/adminer
Example servers.php:
<?php
// mysql, pgsql, sqlite, mssql, oracle
$allowed_drivers = [
'mysql',
'pgsql',
];
// hostname[:port], matched exactly
$allowed_servers = [
'database',
'localhost',
];
Both lists are optional, and a missing or empty list allows everything. Leaving the server field empty (the driver's default host) is always allowed. Blocked hosts are rejected before Adminer connects to them, so they are never contacted. Leave sqlite out of $allowed_drivers unless you need it: SQLite logins don't require a password.
Build
./build.sh
Builds a multi-platform image (amd64, arm64) and pushes to the registry. Requires being logged in:
docker login https://git.paucapo.com/