Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion config-example/docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MAIN_NODE_IP=192.168.1.20
SECOND_NODE=hive
SECOND_NODE_IP=192.168.1.243

# Local accounts
### Local accounts

ADMIN_USER=admin
ADMIN_PASSWORD="use-some-very-secure-value-here"
Expand All @@ -25,3 +25,8 @@ ADMIN_DISPLAYNAME=AdminUser
ADMIN_HOME=/home/buba

INFRA_CONFIG_PATH=${ADMIN_HOME}/repos/infra/config

### Cloud accounts

# Genetate at: https://github.com/settings/tokens/new
GITHUB_API_TOKEN="use-some-very-secure-value-here"
13 changes: 13 additions & 0 deletions config-example/docker/myhost/.env
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@ MSSQL_SA_PASSWORD="use-some-very-secure-value-here"
# Optional: Custom collation (default: SQL_Latin1_General_CP1_CI_AS)
# MSSQL_COLLATION="SQL_Latin1_General_CP1_CI_AS"

### PostgreSQL configuration
POSTGRES_USER="postgres"
POSTGRES_PASSWORD="use-some-very-secure-value-here"
POSTGRES_DB="postgres"

### Adminer configuration
# Optional: Default database server to connect to (leave empty for manual selection)
ADMINER_DEFAULT_SERVER=""
# Optional: Custom design theme name (leave empty for default)
ADMINER_DESIGN=""
# Optional: Space-separated list of plugins to enable (e.g., "tables-filter tinymce")
ADMINER_PLUGINS=""

### ScanServJS configuration
SCANSERVJS_SANED_NET_HOSTS="" # Example: "192.168.1.x;192.168.1.y"
SCANSERVJS_AIRSCAN_DEVICES=""
Expand Down
2 changes: 1 addition & 1 deletion config-example/docker/myhost/.env.supabase
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SUPABASE_PG_META_CRYPTO_KEY="use-some-very-secure-value-here"

SUPABASE_POSTGRES_HOST=db
SUPABASE_POSTGRES_DB=postgres
SUPABASE_POSTGRES_PORT=5432
SUPABASE_POSTGRES_PORT=5434 # Default: 5432
# default user is postgres


Expand Down
6 changes: 6 additions & 0 deletions config-example/docker/myhost/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,16 @@ services:
state: up
- name: bees
state: up

- database:
- name: adminer
state: up
- name: couchdb
state: up
- name: mssql-server
state: up
- name: postgresql
state: up

- backup:
- name: kopia-nas
Expand Down
40 changes: 40 additions & 0 deletions docker/database/adminer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Adminer is a full-featured database management tool written in PHP that consists
# of a single file ready to deploy to the target server. It supports MySQL, MariaDB,
# PostgreSQL, CockroachDB, SQLite, MS SQL, Oracle, and through plugins: Elasticsearch,
# SimpleDB, MongoDB, Firebird, ClickHouse, and IMAP systems.
#
# Links:
# - Home: https://www.adminer.org
# - Source: https://github.com/vrana/adminer
# - Docs: https://hub.docker.com/_/adminer/
#
# TODO: Enable custom plugins via ADMINER_PLUGINS environment variable
# TODO: Consider mounting custom CSS themes for UI customization
# TODO: Create dedicated database network for secure database connections
---
name: adminer
services:
adminer:
image: adminer:5.4.1-standalone
container_name: adminer
restart: unless-stopped
environment:
TZ: ${TIMEZONE}
ADMINER_DEFAULT_SERVER: ${ADMINER_DEFAULT_SERVER:-}
ADMINER_DESIGN: ${ADMINER_DESIGN:-}
ADMINER_PLUGINS: ${ADMINER_PLUGINS:-}
networks:
- proxy
labels:
traefik.enable: true
traefik.http.routers.adminer.middlewares: localaccess-sso@file
traefik.http.services.adminer.loadbalancer.server.port: 8080
homepage.group: Storage
homepage.name: Adminer
homepage.icon: adminer.png
homepage.href: https://adminer.${MYDOMAIN}/
homepage.description: "Full-featured database management tool"

networks:
proxy:
external: true
File renamed without changes.
File renamed without changes.
53 changes: 53 additions & 0 deletions docker/database/postgresql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# PostgreSQL is a powerful, open source object-relational database system with over
# 35 years of active development that has earned it a strong reputation for
# reliability, feature robustness, and performance.
#
# Links:
# - Home: https://www.postgresql.org/
# - Source: https://github.com/docker-library/postgres
# - Docs: https://hub.docker.com/_/postgres
#
# TODO: Add PgBouncer container for connection pooling
# TODO: Add PostgreSQL exporter for Prometheus monitoring
# TODO: Implement automated backup solution (pg_dump or pgBackRest)
# TODO: Consider enabling SSL/TLS for encrypted connections
# TODO: Set up streaming replication for high availability
---
name: postgresql
services:
postgresql:
image: postgres:18.1-trixie
container_name: postgresql
restart: unless-stopped
shm_size: 128mb
environment:
TZ: ${TIMEZONE}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
POSTGRES_INITDB_ARGS: --data-checksums
volumes:
- postgres-data:/var/lib/postgresql
- ./postgresql/initdb:/docker-entrypoint-initdb.d
ports:
- 5432:5432
networks:
- proxy
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
labels:
traefik.enable: false
homepage.group: Storage
homepage.name: PostgreSQL
homepage.icon: postgresql.png
homepage.description: "Powerful open source object-relational database system"

volumes:
postgres-data:

networks:
proxy:
external: true
Empty file.
135 changes: 135 additions & 0 deletions docs/PRPs/containers/adminer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
## Base information for Adminer application

Application name: Adminer
Homepage: https://www.adminer.org
GitHub page: https://github.com/vrana/adminer
Install instructions URL: https://hub.docker.com/_/adminer/
Category: storage
Dashboard Icon: adminer.png
Dashboard Group: Storage
Short description: Full-featured database management tool in a single PHP file
Long description: Adminer is a full-featured database management tool written in PHP that consists of a single file ready to deploy to the target server. It supports MySQL, MariaDB, PostgreSQL, CockroachDB, SQLite, MS SQL, Oracle, and through plugins: Elasticsearch, SimpleDB, MongoDB, Firebird, ClickHouse, and IMAP systems. Adminer offers a tidier user interface, better support for database features, higher performance and more security compared to phpMyAdmin.

## Container deployment

### Docker Compose Configuration

Basic deployment example:

```yaml
services:
adminer:
image: adminer
restart: always
ports:
- 8080:8080
```

Example with database:

```yaml
services:
adminer:
image: adminer
restart: always
ports:
- 8080:8080

db:
image: mysql:5.6
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
```

### Docker Run Command

Standalone mode with database link:
```bash
docker run --link some_database:db -p 8080:8080 adminer
```

Access the interface at `http://localhost:8080` or `http://host-ip:8080`.

### FastCGI Variant

For FastCGI-capable web servers:
```bash
docker run --link some_database:db -p 9000:9000 adminer:fastcgi
```

**Security Note:** The FastCGI socket exposes to port 9000. Implement firewall rules or use private Docker networks to prevent unauthorized access.

### Environment Variables

**ADMINER_PLUGINS:** Load official plugins by passing a space-separated filename list.

Example:
```yaml
environment:
ADMINER_PLUGINS: 'tables-filter tinymce'
```

**Plugin Configuration:** Some plugins require parameters and need custom configuration files mounted in `/var/www/html/plugins-enabled/`.

Available plugins: https://github.com/vrana/adminer/tree/master/plugins

### Security Considerations

1. **Access Control:** Adminer provides direct database access, so it should be placed behind authentication (e.g., Traefik with Authelia)
2. **Network Isolation:** Use private Docker networks instead of exposing ports publicly
3. **Database Credentials:** Never hardcode credentials in compose files; use environment variables or Docker secrets
4. **FastCGI Exposure:** When using the FastCGI variant, ensure port 9000 is not exposed to untrusted networks
5. **Regular Updates:** Keep the Adminer image updated for security patches

### Supported Architectures

The official image supports: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, and s390x.

### Database Support

Adminer can manage the following database systems:
- MySQL / MariaDB
- PostgreSQL / CockroachDB
- SQLite
- MS SQL
- Oracle
- Firebird
- SimpleDB (via plugins)
- Elasticsearch (via plugins)
- MongoDB (via plugins)

### Recommended Improvements

1. **Reverse Proxy Integration:** Deploy behind Traefik with authentication middleware
2. **Custom Plugins:** Mount custom plugin configuration for enhanced functionality
3. **Theme Customization:** Adminer supports custom CSS themes that can be mounted
4. **Database Network:** Create a dedicated Docker network for database connections
5. **Read-Only Mode:** For production databases, consider using database user accounts with read-only permissions

### Example Production-Ready Deployment

```yaml
services:
adminer:
image: adminer
container_name: adminer
restart: unless-stopped
networks:
- database_network
- proxy_network
environment:
ADMINER_PLUGINS: 'tables-filter tinymce'
labels:
- "traefik.enable=true"
- "traefik.http.routers.adminer.rule=Host(`adminer.example.com`)"
- "traefik.http.routers.adminer.entrypoints=websecure"
- "traefik.http.routers.adminer.tls.certresolver=letsencrypt"
- "traefik.http.routers.adminer.middlewares=authelia@docker"

networks:
database_network:
external: true
proxy_network:
external: true
```
Loading