wodby / drupal-php

PHP docker container image for Drupal
https://wodby.com/stacks/drupal
MIT License
60 stars 81 forks source link

Drush command not found in drupal-php:5.6 #36

Closed condor616 closed 7 years ago

condor616 commented 7 years ago

Hi all, I'm experiencing a weird issue recently and it's related to Drush. I'm using the docker-compose.yml file below, and when I SSH into the PHP container and run drush, it says "command not found". Look like drush is not installed.

Has anything like this ever happened to you? Thanks

php:
    image: wodby/drupal-php:5.6-2.3.0
    environment:
      PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
      PHP_FPM_MAX_CHILDREN: 300
      PHP_FPM_START_SERVERS: 10
      PHP_FPM_MIN_SPARE_SERVERS: 10
      PHP_FPM_MAX_SPARE_SERVERS: 40
      PHP_MAX_INPUT_VARS: 4000
      DB_HOST: mysql
      DB_USER: user
      DB_PASSWORD: password
      DB_NAME: mysite
      DB_DRIVER: mysql
      #PHP_XDEBUG: 1
      #PHP_XDEBUG_DEFAULT_ENABLE: 1
      #PHP_XDEBUG_REMOTE_CONNECT_BACK: 0         # This is needed to respect remote.host setting bellow
      #PHP_XDEBUG_REMOTE_HOST: "10.254.254.254"  # You will also need to 'sudo ifconfig lo0 alias 10.254.254.254'
    volumes_from:
      - data
    volumes:
      - docker-sync-mysite:/var/www/mysite:nocopy
      - ../db-dumps:/home/db-dumps
      - ./conf/php/custom.ini:/usr/local/etc/php/conf.d/custom.ini
csandanov commented 7 years ago

How do you SSH to a container?

condor616 commented 7 years ago

I use Portainer UI to access bash in the container. I solved the issue by unmounting a shared volume between php and mariadb. Not sure why it was an issue. Thank you