Created
February 15, 2021 07:46
-
-
Save ShahinSorkh/9322c34bc09ebef03156eac45c8f1d76 to your computer and use it in GitHub Desktop.
run adminer:fastcgi using docker-compose
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
#!/bin/sh | |
cat <<EOF >/tmp/adminer.conf | |
server { | |
listen 80; | |
server_name localhost; | |
index index.php; | |
location ~ ^/(index.php)?$ { | |
fastcgi_index index.php; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME /var/www/html/index.php; | |
fastcgi_param DOCUMENT_ROOT /var/www/html/; | |
fastcgi_pass adminer:9000; | |
} | |
} | |
EOF | |
cat <<EOF >/tmp/adminer.yaml | |
version: '3.7' | |
services: | |
adminer: | |
image: adminer:fastcgi | |
nginx: | |
image: nginx:alpine | |
ports: | |
- 8080:80 | |
volumes: | |
- /tmp/adminer.conf:/etc/nginx/conf.d/default.conf:ro | |
EOF | |
docker-compose -f /tmp/adminer.yaml $* | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works like a charm, thanks!
Adopted it for Kubernetes: