Basic settings and plugins for adminer
  • PHP 96.8%
  • CSS 2.3%
  • Shell 0.8%
  • Dockerfile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pau Capó ea06227293
All checks were successful
Weekly Docker Image Build / update (push) Successful in 1s
Weekly Docker Image Build / build-amd64 (push) Successful in 44s
Weekly Docker Image Build / build-arm64 (push) Successful in 1m24s
Weekly Docker Image Build / merge (push) Successful in 4s
build multi-arch images on native runners
2026-10-22 18:14:30 +02:00
.forgejo/workflows build multi-arch images on native runners 2026-10-22 18:14:30 +02:00
adminer-plugins update adminer to 6.1.1 and restrict server access 2026-10-14 12:23:57 +02:00
assets update adminer to 6.1.1 and restrict server access 2026-10-14 12:23:57 +02:00
.dockerignore update adminer to 6.1.1 and restrict server access 2026-10-14 12:23:57 +02:00
.gitignore update adminer to 6.1.1 and restrict server access 2026-10-14 12:23:57 +02:00
.htaccess disable session upload progress 2026-10-21 09:37:53 +02:00
adminer.php update adminer to 6.1.2 [skip ci] 2026-10-19 04:00:51 +00:00
build.sh build remote images in remote server 2026-02-08 12:31:13 +01:00
docker-entrypoint.sh disable session upload progress 2026-10-21 09:37:53 +02:00
Dockerfile update adminer to 6.1.1 and restrict server access 2026-10-14 12:23:57 +02:00
README.md disable session upload progress 2026-10-21 09:37:53 +02:00
update.sh update adminer to 6.1.1 and restrict server access 2026-10-14 12:23:57 +02:00

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 treats localhost as a Unix socket path, which fails inside the container. Add this to the end of servers.php to 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/