Skip to content

Instantly share code, notes, and snippets.

@ShahinSorkh
Created February 15, 2021 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShahinSorkh/9322c34bc09ebef03156eac45c8f1d76 to your computer and use it in GitHub Desktop.
Save ShahinSorkh/9322c34bc09ebef03156eac45c8f1d76 to your computer and use it in GitHub Desktop.
run adminer:fastcgi using docker-compose
#!/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