TimWolla / docker-adminer

Database management in a single PHP file
https://hub.docker.com/_/adminer/
161 stars 70 forks source link

adminer:fastcgi don't working in my stack with php-fpm #88

Closed schel4ok closed 3 years ago

schel4ok commented 3 years ago

I have docker-compose for custom webserver with mariadb, nginx, php:7.4-fpm, adminer and some other nextra containers.

When I have setup like below everything works well and adminer is accessible in browser http://localhost:8080

version: '3.5'

services:

  mariadb:  
    image: mariadb
    .... some other settings ...
    networks:
      - internal

  adminer:
    image: adminer
    container_name: adminer
    depends_on:
      - mariadb
    environment:
      ADMINER_DEFAULT_SERVER: mariadb
      TZ: ${WORKSPACE_TIMEZONE}
    ports:
      - 8080:8080
    restart: always
    networks:
      - internal

  nginx:
    container_name: nginx
    build:
      context: ./nginx
    .... some other settings ...
    networks:
      - internal

  php:  
    container_name: php
    build:
      context: ./php  # FROM php:7.4-fpm
      args:
        PHPVERSION: "7.4"        # with php-7.4 compatible xdebug-2.9.1
        XDEBUGVERSION: "2.9.1"   # with php-7.3 compatible xdebug-2.7.1
    working_dir: /var/www
    environment:
      XDEBUG_CONFIG: "remote_host=192.168.220.1 remote_enable=1"
      PHP_IDE_CONFIG: "serverName=Docker"
      TZ: ${WORKSPACE_TIMEZONE}
    volumes:
      - ./.ssh:/home/www-data/.ssh
      - ${PROJECTS}:/var/www
    restart: always
    networks:
      - internal

networks:
  internal:
    name: webserver
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 192.168.220.0/28

But when I change adminer to adminer:fastcgi then in http://localhost:9000 I have nothing

    image: adminer:fastcgi
    ports:
      - 9000:9000
TimWolla commented 3 years ago

But when I change adminer to adminer:fastcgi then in http://localhost:9000 I have nothing

Of course that does not work. adminer:fastcgi speaks FastCGI only. You need to point your FastCGI capable webserver (i.e. nginx) to port 9000, not your web browser.

See: https://github.com/TimWolla/docker-adminer/issues/14#issuecomment-385508119