0

I cloned the drupal project on my local.

I have a Docker desktop app.

so I run docker-compose up -d on command prompt.

docker-compose.yml:

services:
mariadb:
    image: wodby/mariadb:$MARIADB_TAG
    container_name: "${PROJECT_NAME}_mariadb"
    stop_grace_period: 30s
    environment:
      MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
      MYSQL_DATABASE: $DB_NAME
      MYSQL_USER: $DB_USER
      MYSQL_PASSWORD: $DB_PASSWORD
    volumes:
      - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
#      - /path/to/mariadb/data/on/host:/var/lib/mysql # Use bind mount

  php:
    image: wodby/drupal-php:$PHP_TAG
    container_name: "${PROJECT_NAME}_php"
    environment:
      SSMTP_MAILHUB: mailhog:1025
      PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t -f"'    
    volumes:
    - ./:/var/www/html:cached
## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac
#    - drupal:/var/www/html
## For XHProf and Xdebug profiler traces
#    - files:/mnt/files

  crond:
    init: true
    image: wodby/drupal-php:$PHP_TAG
    container_name: "${PROJECT_NAME}_crond"
    environment:
      CRONTAB: "0 * * * * drush -r /var/www/html/web cron"
    command: sudo -E crond -f -d 0
    volumes:
    - ./:/var/www/html:cached
## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac
#    - drupal:/var/www/html

  nginx:
    image: wodby/nginx:$NGINX_TAG
    container_name: "${PROJECT_NAME}_nginx"
    depends_on:
    - php
    environment:
      NGINX_STATIC_OPEN_FILE_CACHE: "off"
      NGINX_ERROR_LOG_LEVEL: error
      NGINX_BACKEND_HOST: php
      NGINX_SERVER_ROOT: /var/www/html/web
      NGINX_VHOST_PRESET: $NGINX_VHOST_PRESET
    #      NGINX_DRUPAL_FILE_PROXY_URL: http://example.com
    volumes:
    - ./:/var/www/html:cached
    ports:
    - "8000:80"

enter image description here

But I cannot run drush cim command.

where should I run this command when using docker.

enter image description here

when I go to localhost:8000 on browser, I can see this page.

enter image description here enter image description here what's the reason?

Bohdan V.
  • 115
  • 1
  • 11
  • drush cim command runs on the project root. Still, your question is not clear. Please provide more info so that i can help you or guide you to fix your issue. – Xab Ion Aug 28 '23 at 04:56

0 Answers0