-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
249 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[{*.json, *.yml}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: "Docker" | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: ["master"] | ||
|
||
schedule: | ||
- cron: "0 8 * * 1" | ||
|
||
jobs: | ||
build: | ||
name: "Build" | ||
uses: dockette/.github/.github/workflows/docker.yml@master | ||
secrets: inherit | ||
with: | ||
image: "dockette/adminerevo" | ||
tag: "${{ matrix.item }}" | ||
context: "${{ matrix.context }}" | ||
strategy: | ||
matrix: | ||
include: | ||
- { item: latest, context: adminerevo } | ||
|
||
fail-fast: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
DOCKER_IMAGE=dockette/adminerevo | ||
DOCKER_PLATFORM=linux/amd64 | ||
|
||
.PHONY: docker-build | ||
docker-build: | ||
docker buildx \ | ||
build \ | ||
--platform ${DOCKER_PLATFORM} \ | ||
--pull \ | ||
-t ${DOCKER_IMAGE} \ | ||
adminerevo | ||
|
||
.PHONY: docker-run | ||
docker-run: | ||
docker run \ | ||
-it \ | ||
--rm \ | ||
--platform ${DOCKER_PLATFORM} \ | ||
-p 8080:8080 \ | ||
--name adminer \ | ||
${DOCKER_IMAGE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<h1 align=center>Dockette / Nexus</h1> | ||
|
||
<p align=center> | ||
🎁 Tiniest boxed dockerized Adminer (MySQL, PostgreSQL, SQLite, Mongo, Oracle) Dockerfiles. Database management in a single PHP file. | ||
</p> | ||
|
||
<p align=center> | ||
🕹 <a href="https://f3l1x.io">f3l1x.io</a> | 💻 <a href="https://github.com/f3l1x">f3l1x</a> | 🐦 <a href="https://twitter.com/xf3l1x">@xf3l1x</a> | ||
</p> | ||
|
||
<p align=center> | ||
<a href="https://hub.docker.com/r/dockette/adminer/"><img src="https://badgen.net/docker/pulls/dockette/adminer"></a> | ||
<a href="https://bit.ly/ctteg"><img src="https://badgen.net/badge/support/gitter/cyan"></a> | ||
<a href="https://github.com/sponsors/f3l1x"><img src="https://badgen.net/badge/sponsor/donations/F96854"></a> | ||
</p> | ||
|
||
![Adminer](https://rawgit.com/dockette/adminer/master/.docs/assets/adminer.png) | ||
|
||
------ | ||
|
||
## Prologue | ||
|
||
There are few variants of this adminer image based: | ||
|
||
- full (mysql, pgsql, sqlite, mongo) | ||
- mysql (only) | ||
- pgsql (only) | ||
- mongo (only) | ||
- dg (custom) | ||
|
||
**Features** | ||
|
||
- Alpine Linux (full, editor, df, mongo, mysql, postgres) | ||
- Debian Buster (oracle-11, oracle-12) | ||
- PHP 8 (concurrency via PHP cli workers) | ||
|
||
## Usage | ||
|
||
```sh | ||
docker run \ | ||
--rm | ||
-p 8000:80 | ||
dockette/adminer:dg | ||
``` | ||
|
||
By default container is running with these settings, you can override it using environment variables. | ||
|
||
- `MEMORY=256M` (memory_limit) | ||
- `UPLOAD=2048M` (upload_max_filesize, post_max_size) | ||
- `WORKERS=4` (concurrency) | ||
|
||
```sh | ||
docker run \ | ||
--rm | ||
-p 8000:80 | ||
-e MEMORY=512M | ||
-e UPLOAD=4096M | ||
dockette/adminer:dg | ||
``` | ||
|
||
## Versions | ||
|
||
| Image | Technologies | Size | Docker Hub | | ||
|------------------------------|---------------------------------------|------|---------------------------------------------------------| | ||
| dockette/adminer | MySQL / PostgreSQL / MongoDB / Sqlite | 12mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | ||
| dockette/adminer:full | MySQL / PostgreSQL / MongoDB / Sqlite | 12mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | ||
| dockette/adminer:mysql | MySQL | 9mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | ||
| dockette/adminer:pgsql | PostgreSQL | 8mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | ||
| dockette/adminer:mongo | MongoDB | 9mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | ||
| dockette/adminer:dg | MySQL / PostgreSQL / MongoDB / Sqlite | 16mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | ||
|
||
### `dockette/adminer:dg` | ||
|
||
> Customization for the best database management tool written in PHP, Adminer | ||
You should take a look to the official github profile (https://github.com/dg/adminer-custom). | ||
|
||
![Adminer DG](https://rawgit.com/dockette/adminer/master/.docs/assets/adminer-dg.png) | ||
|
||
## Maintenance | ||
|
||
**Upgrade Adminer and Adminer Editor versions to X.Y.Z** | ||
|
||
```bash | ||
ADMINER_VERSION=4.8.1 make update-versions | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
auto_https off | ||
admin off | ||
} | ||
|
||
# app | ||
:8080 { | ||
root * /srv | ||
encode zstd gzip | ||
|
||
php_fastcgi unix//var/run/php-fpm.sock | ||
file_server | ||
|
||
try_files {path} /index.php | ||
} | ||
|
||
# metrics | ||
:8090 { | ||
metrics /metrics | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM alpine:3.20 | ||
|
||
LABEL maintainer="Milan Sulc <[email protected]>" | ||
|
||
ENV ADMINEREVO_VERSION=4.8.4 | ||
|
||
RUN echo '@community http://nl.alpinelinux.org/alpine/v3.20/community' >> /etc/apk/repositories && \ | ||
apk --no-cache update && \ | ||
apk --no-cache upgrade && \ | ||
apk add --no-cache \ | ||
tini \ | ||
wget \ | ||
ca-certificates \ | ||
caddy \ | ||
php83-session@community \ | ||
php83-mysqli@community \ | ||
php83-pgsql@community \ | ||
php83-json@community \ | ||
php83-fpm@community && \ | ||
wget https://github.com/adminerevo/adminerevo/releases/download/v${ADMINEREVO_VERSION}/adminer-${ADMINEREVO_VERSION}.php -O /srv/index.php && \ | ||
adduser -D -u 1000 -h /srv -G www-data -g www-data www-data | ||
|
||
COPY ./Caddyfile /srv/ | ||
COPY ./php-fpm.conf /srv/php-fpm.conf | ||
COPY --chmod=777 ./entrypoint.sh /entrypoint.sh | ||
|
||
WORKDIR /srv | ||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["tini", "--"] | ||
CMD ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
set -Eeo pipefail | ||
|
||
php-fpm83 -F -y /srv/php-fpm.conf & | ||
|
||
caddy run --config /srv/Caddyfile & | ||
|
||
wait -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[global] | ||
|
||
error_log = /proc/self/fd/2 | ||
daemonize = yes | ||
|
||
[www] | ||
|
||
; if we send this to /proc/self/fd/1, it never appears | ||
access.log = /proc/self/fd/2 | ||
|
||
; default log format | ||
; access.format = "%R - %u %{%H:%M:%S}t \"%m %r\" %s" | ||
access.format = "[%t] [%m|%s] %f %r%Q%q [%{mili}dms|%{mega}MMB|%{user}C%%|%{system}C%%]" | ||
|
||
slowlog = /proc/self/fd/2 | ||
|
||
user = www-data | ||
group = www-data | ||
|
||
listen = /var/run/php-fpm.sock | ||
listen.owner = www-data | ||
listen.group = www-data | ||
listen.mode = 0660 | ||
|
||
pm = dynamic | ||
pm.max_children = 30 | ||
pm.start_servers = 5 | ||
pm.min_spare_servers = 5 | ||
pm.max_spare_servers = 5 | ||
pm.max_requests = 200 | ||
pm.status_path = /status | ||
pm.process_idle_timeout = 10s | ||
ping.path = /ping | ||
ping.response = pong | ||
catch_workers_output = yes | ||
decorate_workers_output = no | ||
clear_env = no | ||
request_slowlog_timeout = 5s | ||
request_terminate_timeout = 120s | ||
rlimit_files = 131072 | ||
rlimit_core = unlimited | ||
|
||
php_admin_value[open_basedir]= "/tmp:/var/tmp:/var/www:/srv" | ||
php_admin_value[upload_tmp_dir] = "/tmp" |