webdevops / php-docker-boilerplate

:stew: PHP Docker Boilerplate for Symfony, Wordpress, Joomla or any other PHP Project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
https://webdevops.io/projects/php-docker-boilerplate/
MIT License
562 stars 186 forks source link

Usage phpMyAdmin #74

Closed jensmarquardt closed 6 years ago

jensmarquardt commented 6 years ago

Hi,

first of all, i would like to thank you for this nice boilerplate! 👍

After some play around and research I am still not able to access phpMyAdmin from the browser. I know I have to remove the comments from line 184. But how can I access from the browser? Do I have to enter a port number as well?

Thanks for your help!

peter-walter commented 6 years ago

Looks like you need to add a port to the phpmyadmin section

phpmyadmin:
  ports:
    - 8001:80
jensmarquardt commented 6 years ago

I have tested it, but I can not reach phpMyAdmin from the browser. The result is a 500 Internal Server Error. Requested URL: http://localhost:8001.

My docker-compose.yml:

phpmyadmin:
    image: phpmyadmin/phpmyadmin
    links:
      - mysql
    ports:
      - 8001:80
    environment:
      - PMA_HOSTS=mysql
      - VIRTUAL_HOST=pma.boilerplate.docker
      - VIRTUAL_PORT=80
    volumes:
      - phpmyadmin:/sessions
htuscher commented 6 years ago

Can you please post the logs of your phpmyadmin container? docker logs --tail=500 $(docker-compose ps -q phpmyadmin)

jensmarquardt commented 6 years ago

Ok, now it works. But in the meanwhile I have switched to docker edge, because I had general performance issues.

vruescas commented 6 years ago

@hhoechtl, Hi, i have the same problem. Is necessary add a port number? how can I access from the browser?

htuscher commented 6 years ago

@vruescas if you have a reverse proxy in place, you can access http://pma.boilerplate.docker as configured in the ENV variable VIRTUAL_HOST or if you specified a port binding like 8081:80 you can access it via http://whateverhostnameyourdockerisusing:8081/