wodby / docker4drupal

Docker-based Drupal stack
https://wodby.com/docker4drupal
MIT License
1.24k stars 535 forks source link

Не создаётся база в mariadb 10.2 и выше. Сервер nginx выдаёт ошибку 500.The website encountered an unexpected error. Please try again later. #438

Closed oegkava closed 4 years ago

oegkava commented 4 years ago

Codebase

Built-in vanilla Drupal or mounted codebase

Host OS

e.g. macOS Catalina 10.15.4

Docker info output

# Run "docker info" on the host machine and paste output here 
Client:
 Debug Mode: false

Server:
 Containers: 6
  Running: 5
  Paused: 0
  Stopped: 1
 Images: 6
 Server Version: 19.03.8
 Storage Driver: overlay2
  Backing Filesystem: <unknown>
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.76-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 1.945GiB
 Name: docker-desktop
 ID: EBLE:2DI2:JL4V:ANM4:U5DQ:YAFK:C4YZ:IYKT:A6MI:A66W:4OF3:TUUB
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 81
  Goroutines: 85
  System Time: 2020-05-26T19:00:04.025473272Z
  EventsListeners: 4
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

### Docker compose file
Make sure you remove all commented services.
version: "3"

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.
      - ./db:/var/lib/mysql # Use bind mount

  php:
    image: wodby/drupal-php:$PHP_TAG
    container_name: "${PROJECT_NAME}_php"
    environment:
      PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
#      PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S opensmtpd:25      
      DB_HOST: $DB_HOST
      DB_PORT: $DB_PORT
      DB_USER: $DB_USER
      DB_PASSWORD: $DB_PASSWORD
      DB_NAME: $DB_NAME
      DB_DRIVER: $DB_DRIVER
      PHP_FPM_USER: wodby
      PHP_FPM_GROUP: wodby
      COLUMNS: 80 # Set 80 columns for docker exec -it.
## Read instructions at https://wodby.com/docs/stacks/php/local/#xdebug
#      PHP_XDEBUG: 1
#      PHP_XDEBUG_DEFAULT_ENABLE: 1
#      PHP_XDEBUG_REMOTE_CONNECT_BACK: 0
#      PHP_IDE_CONFIG: serverName=my-ide
#      PHP_XDEBUG_IDEKEY: "my-ide"
#      PHP_XDEBUG_REMOTE_HOST: host.docker.internal # Docker 18.03+ Mac/Win
#      PHP_XDEBUG_REMOTE_HOST: 172.17.0.1 # Linux
#      PHP_XDEBUG_REMOTE_HOST: 10.254.254.254 # macOS, Docker < 18.03
#      PHP_XDEBUG_REMOTE_HOST: 10.0.75.1 # Windows, Docker < 18.03
#      PHP_XDEBUG_REMOTE_LOG: /tmp/php-xdebug.log
## PHPUnit Drupal testing configurations
#      SIMPLETEST_BASE_URL: "http://nginx"
#      SIMPLETEST_DB: "${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}#tests_"
#      MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--disable-gpu","--headless"]}}, "http://chrome:9515"]'

    volumes:
      - ./:/var/www/html:cached
## Alternative for macOS users: docker-sync https://wodby.com/docs/stacks/drupal/local#docker-for-mac
#      - docker-sync:/var/www/html
## For XHProf and Xdebug profiler traces
#      - files:/mnt/files

  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: debug
      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
## Alternative for macOS users: docker-sync https://wodby.com/docs/stacks/drupal/local#docker-for-mac
#      - docker-sync:/var/www/html
    labels:
      - "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)"

  mailhog:
    image: mailhog/mailhog
    container_name: "${PROJECT_NAME}_mailhog"
    labels:
      - "traefik.http.services.${PROJECT_NAME}_mailhog.loadbalancer.server.port=8025"
      - "traefik.http.routers.${PROJECT_NAME}_mailhog.rule=Host(`mailhog.${PROJECT_BASE_URL}`)"

#  postgres:
#    image: wodby/postgres:$POSTGRES_TAG
#    container_name: "${PROJECT_NAME}_postgres"
#    stop_grace_period: 30s
#    environment:
#      POSTGRES_PASSWORD: $DB_PASSWORD
#      POSTGRES_DB: $DB_NAME
#      POSTGRES_USER: $DB_USER
#    volumes:
#      - ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here.
#      - /path/to/postgres/data/on/host:/var/lib/postgresql/data # Use bind mount

#  apache:
#    image: wodby/apache:$APACHE_TAG
#    container_name: "${PROJECT_NAME}_apache"
#    depends_on:
#      - php
#    environment:
#      APACHE_LOG_LEVEL: debug
#      APACHE_BACKEND_HOST: php
#      APACHE_VHOST_PRESET: php
#      APACHE_DOCUMENT_ROOT: /var/www/html/web
#    volumes:
#      - ./:/var/www/html:cached
## Alternative for macOS users: docker-sync https://wodby.com/docs/stacks/drupal/local#docker-for-mac
#      - docker-sync:/var/www/html
#    labels:
#      - "traefik.http.routers.${PROJECT_NAME}_apache.rule=Host(`${PROJECT_BASE_URL}`)"

#  varnish:
#    image: wodby/varnish:$VARNISH_TAG
#    container_name: "${PROJECT_NAME}_varnish"
#    depends_on:
#      - nginx
#    environment:
#      VARNISH_SECRET: secret
#      VARNISH_BACKEND_HOST: nginx
#      VARNISH_BACKEND_PORT: 80
#      VARNISH_CONFIG_PRESET: drupal
#      VARNISH_ALLOW_UNRESTRICTED_PURGE: 1
#    labels:
#      - "traefik.http.services.${PROJECT_NAME}_varnish.loadbalancer.server.port=6081"
#      - "traefik.http.routers.${PROJECT_NAME}_varnish.rule=Host(`varnish.${PROJECT_BASE_URL}`)"

#  redis:
#    container_name: "${PROJECT_NAME}_redis"
#    image: wodby/redis:$REDIS_TAG

  adminer:
    container_name: "${PROJECT_NAME}_adminer"
    image: wodby/adminer:$ADMINER_TAG
    environment:
# For PostgreSQL:
#      ADMINER_DEFAULT_DB_DRIVER: pgsql
      ADMINER_DEFAULT_DB_HOST: $DB_HOST
      ADMINER_DEFAULT_DB_NAME: $DB_NAME
    labels:
      - "traefik.http.routers.${PROJECT_NAME}_adminer.rule=Host(`adminer.${PROJECT_BASE_URL}`)"

#  pma:
#    image: phpmyadmin/phpmyadmin
#    container_name: "${PROJECT_NAME}_pma"
#    environment:
#      PMA_HOST: $DB_HOST
#      PMA_USER: $DB_USER
#      PMA_PASSWORD: $DB_PASSWORD
#      UPLOAD_LIMIT: 1G
#    labels:
#      - "traefik.http.routers.${PROJECT_NAME}_pma.rule=Host(`pma.${PROJECT_BASE_URL}`)"

#  solr:
#    image: wodby/solr:$SOLR_TAG
#    container_name: "${PROJECT_NAME}_solr"
#    environment:
#      SOLR_DEFAULT_CONFIG_SET: $SOLR_CONFIG_SET
#      SOLR_HEAP: 1024m
#    labels:
#      - "traefik.http.routers.${PROJECT_NAME}_solr.rule=Host(`solr.${PROJECT_BASE_URL}`)"

#  drupal-node:
#    image: wodby/drupal-node:$DRUPAL_NODE_TAG
#    container_name: "${PROJECT_NAME}_drupal_nodejs"
#    labels:
#      - "traefik.http.routers.${PROJECT_NAME}_drupal_node.rule=Host(`drupal_node.${PROJECT_BASE_URL}`)"
#    environment:
#      NODE_SERVICE_KEY: node-service-key

#  memcached:
#    container_name: "${PROJECT_NAME}_memcached"
#    image: wodby/memcached:$MEMCACHED_TAG

#  rsyslog:
#    container_name: "${PROJECT_NAME}_rsyslog"
#    image: wodby/rsyslog:$RSYSLOG_TAG

#  athenapdf:
#    image: arachnysdocker/athenapdf-service:$ATHENAPDF_TAG
#    container_name: "${PROJECT_NAME}_athenapdf"
#    environment:
#      WEAVER_AUTH_KEY: weaver-auth-key
#      WEAVER_ATHENA_CMD: "athenapdf -S"
#      WEAVER_MAX_WORKERS: 10
#      WEAVER_MAX_CONVERSION_QUEUE: 50
#      WEAVER_WORKER_TIMEOUT: 90
#      WEAVER_CONVERSION_FALLBACK: "false"

#  node:
#    image: wodby/node:$NODE_TAG
#    container_name: "${PROJECT_NAME}_node"
#    working_dir: /var/www/html/path/to/theme/to/build
#    labels:
#      - "traefik.http.services.${PROJECT_NAME}_node.loadbalancer.server.port=3000"
#      - "traefik.http.routers.${PROJECT_NAME}_node.rule=Host(`node.${PROJECT_BASE_URL}`)"
#    expose:
#      - "3000"
#    volumes:
#      - ./:/var/www/html
#    command: sh -c 'yarn install && yarn run start'

#  blackfire:
#    image: blackfire/blackfire
#    container_name: "${PROJECT_NAME}_blackfire"
#    environment:
#      BLACKFIRE_SERVER_ID: XXXXX
#      BLACKFIRE_SERVER_TOKEN: YYYYY

#  webgrind:
#    image: wodby/webgrind:$WEBGRIND_TAG
#    container_name: "${PROJECT_NAME}_webgrind"
#    environment:
#      WEBGRIND_PROFILER_DIR: /mnt/files/xdebug/profiler
#    labels:
#      - "traefik.http.routers.${PROJECT_NAME}_webgrind.rule=Host(`webgrind.${PROJECT_BASE_URL}`)"
#    volumes:
#      - files:/mnt/files

#  elasticsearch:
#    image: wodby/elasticsearch:$ELASTICSEARCH_TAG
#    container_name: "${PROJECT_NAME}_elasticsearch"
#    environment:
#      ES_JAVA_OPTS: "-Xms500m -Xmx500m"
#    ulimits:
#      memlock:
#        soft: -1
#        hard: -1

#  kibana:
#    image: wodby/kibana:$KIBANA_TAG
#    container_name: "${PROJECT_NAME}_kibana"
#    depends_on:
#      - elasticsearch
#    labels:
#      - "traefik.http.services.${PROJECT_NAME}_kibana.loadbalancer.server.port=5601"
#      - "traefik.http.routers.${PROJECT_NAME}_kibana.rule=Host(`kibana.${PROJECT_BASE_URL}`)"

#  opensmtpd:
#    container_name: "${PROJECT_NAME}_opensmtpd"
#    image: wodby/opensmtpd:$OPENSMTPD_TAG

#  xhprof:
#    image: wodby/xhprof:$XHPROF_TAG
#    container_name: "${PROJECT_NAME}_xhprof"
#    restart: always
#    volumes:
#      - files:/mnt/files
#    labels:
#      - "traefik.http.routers.${PROJECT_NAME}_xhprof.rule=Host(`xhprof.${PROJECT_BASE_URL}`)"

#  chrome:
#    image: selenium/standalone-chrome:$SELENIUM_CHROME_TAG
#    container_name: "${PROJECT_NAME}_chrome"
#    volumes:
#      - /dev/shm:/dev/shm
#    entrypoint:
#      - chromedriver
#      - "--no-sandbox"
#      - "--disable-dev-shm-usage"
#      - "--log-path=/tmp/chromedriver.log"
#      - "--verbose"
#      - "--whitelisted-ips="

#  portainer:
#    image: portainer/portainer
#    container_name: "${PROJECT_NAME}_portainer"
#    command: --no-auth -H unix:///var/run/docker.sock
#    volumes:
#      - /var/run/docker.sock:/var/run/docker.sock
#    labels:
#      - "traefik.http.routers.${PROJECT_NAME}_portainer.rule=Host(`portainer.${PROJECT_BASE_URL}`)"

  traefik:
    image: traefik:v2.0
    container_name: "${PROJECT_NAME}_traefik"
    command: --api.insecure=true --providers.docker
    ports:
      - '80:80'
#      - '80:8080' # Dashboard
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

#volumes:
## Docker-sync for macOS users
#  docker-sync:
#    external: true
## For Xdebug profiler
#  files:

# Content of your docker-compose.yml file. Make sure you remove all sensible information you might have there.

.env file

Documentation available at https://wodby.com/docs/stacks/drupal/local

Changelog can be found at https://github.com/wodby/docker4drupal/releases

Images tags format explained at https://github.com/wodby/docker4drupal#images-tags

PROJECT SETTINGS

PROJECT_NAME=tppak PROJECT_BASE_URL=tppak.localhost

DB_NAME=drupal DB_USER=drupal DB_PASSWORD=drupal DB_ROOT_PASSWORD=password DB_HOST=mariadb DB_PORT=3306 DB_DRIVER=mysql

--- MARIADB ----

MARIADB_TAG=10.4-3.8.2

MARIADB_TAG=10.3-3.8.2

MARIADB_TAG=10.2-3.8.2

MARIADB_TAG=10.1-3.8.2

--- VANILLA DRUPAL ----

DRUPAL_TAG=8-4.17.12

DRUPAL_TAG=7-4.17.12

--- PHP ----

Linux (uid 1000 gid 1000)

PHP_TAG=7.3-dev-4.15.8

PHP_TAG=7.2-dev-4.15.8

PHP_TAG=7.4-dev-4.15.8

macOS (uid 501 gid 20)

PHP_TAG=7.3-dev-macos-4.15.8

PHP_TAG=7.2-dev-macos-4.15.8

PHP_TAG=7.4-dev-macos-4.15.8

--- NGINX ----

NGINX_TAG=1.17-5.8.14

NGINX_TAG=1.16-5.8.14

NGINX_VHOST_PRESET=drupal8

NGINX_VHOST_PRESET=drupal7

NGINX_VHOST_PRESET=drupal6

--- SOLR ---

SOLR_CONFIG_SET="search_api_solr_8.x-3.2"

SOLR_CONFIG_SET="search_api_solr_8.x-2.7"

SOLR_CONFIG_SET="search_api_solr_8.x-1.2"

SOLR_CONFIG_SET="search_api_solr_7.x-1.14"

SOLR_TAG=8-4.5.2

SOLR_TAG=7-4.5.2

SOLR_TAG=6-4.5.2

SOLR_TAG=5-4.5.2

--- ELASTICSEARCH ---

ELASTICSEARCH_TAG=7-5.4.2

ELASTICSEARCH_TAG=6-5.4.2

--- KIBANA ---

KIBANA_TAG=7-5.4.2

KIBANA_TAG=6-5.4.2

--- REDIS ---

REDIS_TAG=5-3.3.0

REDIS_TAG=6-3.3.0

--- NODE ---

NODE_TAG=12-dev-0.34.5

NODE_TAG=10-dev-0.34.5

NODE_TAG=8-dev-0.34.5

--- VARNISH ---

VARNISH_TAG=6.0-4.4.6

VARNISH_TAG=4.1-4.4.6

--- POSTGRESQL ----

POSTGRES_TAG=12-1.9.3

POSTGRES_TAG=11-1.9.3

POSTGRES_TAG=10-1.9.3

POSTGRES_TAG=9.6-1.9.3

POSTGRES_TAG=9.5-1.9.3

POSTGRES_TAG=9.4-1.9.3

OTHERS

ADMINER_TAG=4-3.9.11 APACHE_TAG=2.4-4.2.6 ATHENAPDF_TAG=2.10.0 DRUPAL_NODE_TAG=1.0-2.0.0 MEMCACHED_TAG=1-2.5.5 OPENSMTPD_TAG=6.0-1.6.5 RSYSLOG_TAG=latest SELENIUM_CHROME_TAG=3.141 WEBGRIND_TAG=1-1.15.5 XHPROF_TAG=2.2.4

Content of .env file. Make sure you remove all sensible information you might have there.


### Logs output
Attaching to tppak_nginx, tppak_mariadb, tppak_adminer, tppak_traefik, tppak_php, tppak_mailhog
adminer_1  | sudo: setrlimit(RLIMIT_CORE): Operation not permitted
adminer_1  | PHP 7.2.30 Development Server started at Tue May 26 18:43:44 2020
mailhog_1  | 2020/05/26 18:43:42 Using in-memory storage
mailhog_1  | 2020/05/26 18:43:42 [SMTP] Binding to address: 0.0.0.0:1025
mailhog_1  | [HTTP] Binding to address: 0.0.0.0:8025
mailhog_1  | 2020/05/26 18:43:42 Serving under http://0.0.0.0:8025/
mailhog_1  | Creating API v1 with WebPath: 
mailhog_1  | Creating API v2 with WebPath: 
mailhog_1  | [APIv1] KEEPALIVE /api/v1/events
traefik_1  | time="2020-05-26T18:43:43Z" level=info msg="Configuration loaded from flags."
nginx_1    | 2020/05/26 18:43:44 [notice] 1#1: using the "epoll" event method
nginx_1    | 2020/05/26 18:43:44 [notice] 1#1: nginx/1.17.10
nginx_1    | 2020/05/26 18:43:44 [notice] 1#1: built by gcc 6.4.0 (Alpine 6.4.0) 
nginx_1    | 2020/05/26 18:43:44 [notice] 1#1: OS: Linux 4.19.76-linuxkit
nginx_1    | 2020/05/26 18:43:44 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx_1    | 2020/05/26 18:43:44 [notice] 1#1: start worker processes
nginx_1    | 2020/05/26 18:43:44 [notice] 1#1: start worker process 37
nginx_1    | 2020/05/26 18:43:44 [notice] 1#1: start worker process 38
php_1      | sudo: setrlimit(RLIMIT_CORE): Operation not permitted
php_1      | sudo: setrlimit(RLIMIT_CORE): Operation not permitted
php_1      | sudo: setrlimit(RLIMIT_CORE): Operation not permitted
php_1      | [26-May-2020 18:43:46] NOTICE: fpm is running, pid 1
php_1      | [26-May-2020 18:43:46] NOTICE: ready to handle connections
mariadb_1  | Initializing database
mariadb_1  | 2020-05-26 18:43:44 0 [ERROR] InnoDB: preallocating 10485760 bytes for file ./ibdata1 failed with error 95
mariadb_1  | 2020-05-26 18:43:44 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
mariadb_1  | 2020-05-26 18:43:44 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
mariadb_1  | 2020-05-26 18:43:45 0 [ERROR] Plugin 'InnoDB' init function returned error.
mariadb_1  | 2020-05-26 18:43:45 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
mariadb_1  | 2020-05-26 18:43:45 0 [ERROR] Unknown/unsupported storage engine: InnoDB
mariadb_1  | 2020-05-26 18:43:45 0 [ERROR] Aborting
mariadb_1  | 
mariadb_1  | Installation of system tables failed!  Examine the logs in
mariadb_1  | /var/lib/mysql/ for more information.
mariadb_1  | 
mariadb_1  | The problem could be conflicting information in an external
mariadb_1  | my.cnf files. You can ignore these by doing:
mariadb_1  | 
mariadb_1  |     shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
mariadb_1  | 
mariadb_1  | You can also try to start the mysqld daemon with:
mariadb_1  | 
mariadb_1  |     shell> /usr/bin/mysqld --skip-grant-tables --general-log &
mariadb_1  | 
mariadb_1  | and use the command line tool /usr/bin/mysql
mariadb_1  | to connect to the mysql database and look at the grant tables:
mariadb_1  | 
mariadb_1  |     shell> /usr/bin/mysql -u root mysql
mariadb_1  |     mysql> show tables;
mariadb_1  | 
mariadb_1  | Try 'mysqld --help' if you have problems with paths.  Using
mariadb_1  | --general-log gives you a log in /var/lib/mysql/ that may be helpful.
mariadb_1  | 
mariadb_1  | The latest information about mysql_install_db is available at
mariadb_1  | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
mariadb_1  | You can find the latest source at https://downloads.mariadb.org and
mariadb_1  | the maria-discuss email list at https://launchpad.net/~maria-discuss
mariadb_1  | 
mariadb_1  | Please check all of the above before submitting a bug report
mariadb_1  | at http://mariadb.org/jira
mariadb_1  | 

# Run "docker-compose logs [service]". Let's say you get 500 error for some reason then it'll be helpful to provide logs for php and http server (nginx/apache) services.
Mykola-Veryha commented 4 years ago

Could you provide log messages?

Run make logs

in the directory where we have the docker-compose.yml

oegkava commented 4 years ago

Creating tppak_traefik ... done Creating tppak_php ... done Creating tppak_nginx ... done Attaching to tppak_php, tppak_mailhog, tppak_mariadb, tppak_adminer, tppak_traefik, tppak_nginx mailhog_1 | 2020/05/26 14:30:30 Using in-memory storage mailhog_1 | 2020/05/26 14:30:30 [SMTP] Binding to address: 0.0.0.0:1025 adminer_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted php_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted php_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted mailhog_1 | [HTTP] Binding to address: 0.0.0.0:8025 mailhog_1 | 2020/05/26 14:30:30 Serving under  http://0.0.0.0:8025/ mailhog_1 | Creating API v1 with WebPath:  mailhog_1 | Creating API v2 with WebPath:  adminer_1 | PHP 7.2.30 Development Server started at Tue May 26 14:30:31 2020 traefik_1 | time="2020-05-26T14:30:31Z" level=info msg="Configuration loaded from flags." nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: using the "epoll" event method nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: nginx/1.17.10 nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: built by gcc 6.4.0 (Alpine 6.4.0)  nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: OS: Linux 4.19.76-linuxkit nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576: 1048576 nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: start worker processes nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: start worker process 38 nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: start worker process 39 mariadb_1 | Initializing database mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] InnoDB: preallocating  10485760  bytes for file ./ibdata1 failed with error 95 mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again. php_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted php_1 | [26-May-2020 14:30:32] NOTICE: fpm is running, pid 1 php_1 | [26-May-2020 14:30:32] NOTICE: ready to handle connections mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] Plugin 'InnoDB' init function returned error. mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] Unknown/unsupported storage engine: InnoDB mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] Aborting mariadb_1 |  mariadb_1 | Installation of system tables failed! Examine the logs in mariadb_1 | /var/lib/mysql/ for more information. mariadb_1 |  mariadb_1 | The problem could be conflicting information in an external mariadb_1 | my.cnf files. You can ignore these by doing: mariadb_1 |  mariadb_1 | shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf mariadb_1 |  mariadb_1 | You can also try to start the mysqld daemon with: mariadb_1 |  mariadb_1 | shell> /usr/bin/mysqld --skip-grant-tables --general-log & mariadb_1 |  mariadb_1 | and use the command line tool /usr/bin/mysql mariadb_1 | to connect to the mysql database and look at the grant tables: mariadb_1 |  mariadb_1 | shell> /usr/bin/mysql -u root mysql mariadb_1 | mysql> show tables; mariadb_1 |  mariadb_1 | Try 'mysqld --help' if you have problems with paths. Using mariadb_1 | --general-log gives you a log in /var/lib/mysql/ that may be helpful. mariadb_1 |  mariadb_1 | The latest information about mysql_install_db is available at mariadb_1 |  https://mariadb.com/kb/en/installing-system-tables-mysql_install_db mariadb_1 | You can find the latest source at  https://downloads.mariadb.org  and mariadb_1 | the maria-discuss email list at  https://launchpad.net/~maria-discuss mariadb_1 |  mariadb_1 | Please check all of the above before submitting a bug report mariadb_1 | at  http://mariadb.org/jira mariadb_1 |  tppak_mariadb exited with code 1 mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events

Отправлено из мобильной Почты Mail.ru

среда, 27 мая 2020 г., 13:23 +0300 от notifications@github.com notifications@github.com:

Can you provide log messages? Run make logs in the directory where we have the docker-compose.yml — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or unsubscribe .

Mykola-Veryha commented 4 years ago

I mean run make logs

and then go to the site to reproduce the error Then you will get more information about The website encountered an unexpected error. Please try again later.

make logs will show the log messages in real-time

oegkava commented 4 years ago

I don 't understand what needs to be done?

среда, 27 мая 2020 г., 13:31 +0300 от notifications@github.com notifications@github.com:

I mean run make logs and then go to the site to reproduce the error Then you will get more information about The website encountered an unexpected error. Please try again later. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or unsubscribe .

oegkava commented 4 years ago

Creating tppak_traefik ... done Creating tppak_php ... done Creating tppak_nginx ... done Attaching to tppak_php, tppak_mailhog, tppak_mariadb, tppak_adminer, tppak_traefik, tppak_nginx mailhog_1 | 2020/05/26 14:30:30 Using in-memory storage mailhog_1 | 2020/05/26 14:30:30 [SMTP] Binding to address: 0.0.0.0:1025 adminer_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted php_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted php_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted mailhog_1 | [HTTP] Binding to address: 0.0.0.0:8025 mailhog_1 | 2020/05/26 14:30:30 Serving under http://0.0.0.0:8025/ mailhog_1 | Creating API v1 with WebPath: mailhog_1 | Creating API v2 with WebPath: adminer_1 | PHP 7.2.30 Development Server started at Tue May 26 14:30:31 2020 traefik_1 | time="2020-05-26T14:30:31Z" level=info msg="Configuration loaded from flags." nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: using the "epoll" event method nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: nginx/1.17.10 nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: built by gcc 6.4.0 (Alpine 6.4.0) nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: OS: Linux 4.19.76-linuxkit nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576 nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: start worker processes nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: start worker process 38 nginx_1 | 2020/05/26 14:30:31 [notice] 1#1: start worker process 39 mariadb_1 | Initializing database mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] InnoDB: preallocating 10485760 bytes for file ./ibdata1 failed with error 95 mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again. php_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted php_1 | [26-May-2020 14:30:32] NOTICE: fpm is running, pid 1 php_1 | [26-May-2020 14:30:32] NOTICE: ready to handle connections mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] Plugin 'InnoDB' init function returned error. mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] Unknown/unsupported storage engine: InnoDB mariadb_1 | 2020-05-26 14:30:32 0 [ERROR] Aborting mariadb_1 | mariadb_1 | Installation of system tables failed! Examine the logs in mariadb_1 | /var/lib/mysql/ for more information. mariadb_1 | mariadb_1 | The problem could be conflicting information in an external mariadb_1 | my.cnf files. You can ignore these by doing: mariadb_1 | mariadb_1 | shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf mariadb_1 | mariadb_1 | You can also try to start the mysqld daemon with: mariadb_1 | mariadb_1 | shell> /usr/bin/mysqld --skip-grant-tables --general-log & mariadb_1 | mariadb_1 | and use the command line tool /usr/bin/mysql mariadb_1 | to connect to the mysql database and look at the grant tables: mariadb_1 | mariadb_1 | shell> /usr/bin/mysql -u root mysql mariadb_1 | mysql> show tables; mariadb_1 | mariadb_1 | Try 'mysqld --help' if you have problems with paths. Using mariadb_1 | --general-log gives you a log in /var/lib/mysql/ that may be helpful. mariadb_1 | mariadb_1 | The latest information about mysql_install_db is available at mariadb_1 | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db mariadb_1 | You can find the latest source at https://downloads.mariadb.org and mariadb_1 | the maria-discuss email list at https://launchpad.net/~maria-discuss mariadb_1 | mariadb_1 | Please check all of the above before submitting a bug report mariadb_1 | at http://mariadb.org/jira mariadb_1 | tppak_mariadb exited with code 1 mailhog_1 | [APIv1] KEEPALIVE /api/v1/events mailhog_1 | [APIv1] KEEPALIVE /api/v1/events

oegkava commented 4 years ago

On docker 17.3, everything worked fine. After the docker upgrade, these problems started.

Mykola-Veryha commented 4 years ago

I have Docker version 19.03.8 If you send me the full archive with your configuration, then I will run that on my local machime and provide you more details

oegkava commented 4 years ago

ок

Drupal files are copied to the docker php container, but they are not in the project itself. The old version of docker, when adding paths to hidden folders, allowed this, in the new one this cannot be done.

oegkava commented 4 years ago

.env

Documentation available at https://wodby.com/docs/stacks/drupal/local

Changelog can be found at https://github.com/wodby/docker4drupal/releases

Images tags format explained at https://github.com/wodby/docker4drupal#images-tags

PROJECT SETTINGS

PROJECT_NAME=tppak PROJECT_BASE_URL=tppak.localhost

DB_NAME=drupal DB_USER=drupal DB_PASSWORD=drupal DB_ROOT_PASSWORD=password DB_HOST=mariadb DB_PORT=3306 DB_DRIVER=mysql

--- MARIADB ----

MARIADB_TAG=10.4-3.8.2

MARIADB_TAG=10.3-3.8.2

MARIADB_TAG=10.2-3.8.2

MARIADB_TAG=10.1-3.8.2

--- VANILLA DRUPAL ----

DRUPAL_TAG=8-4.17.12

DRUPAL_TAG=7-4.17.12

--- PHP ----

Linux (uid 1000 gid 1000)

PHP_TAG=7.3-dev-4.15.8

PHP_TAG=7.2-dev-4.15.8

PHP_TAG=7.4-dev-4.15.8

macOS (uid 501 gid 20)

PHP_TAG=7.3-dev-macos-4.15.8

PHP_TAG=7.2-dev-macos-4.15.8

PHP_TAG=7.4-dev-macos-4.15.8

--- NGINX ----

NGINX_TAG=1.17-5.8.14

NGINX_TAG=1.16-5.8.14

NGINX_VHOST_PRESET=drupal8

NGINX_VHOST_PRESET=drupal7

NGINX_VHOST_PRESET=drupal6

--- SOLR ---

SOLR_CONFIG_SET="search_api_solr_8.x-3.2"

SOLR_CONFIG_SET="search_api_solr_8.x-2.7"

SOLR_CONFIG_SET="search_api_solr_8.x-1.2"

SOLR_CONFIG_SET="search_api_solr_7.x-1.14"

SOLR_TAG=8-4.5.2

SOLR_TAG=7-4.5.2

SOLR_TAG=6-4.5.2

SOLR_TAG=5-4.5.2

--- ELASTICSEARCH ---

ELASTICSEARCH_TAG=7-5.4.2

ELASTICSEARCH_TAG=6-5.4.2

--- KIBANA ---

KIBANA_TAG=7-5.4.2

KIBANA_TAG=6-5.4.2

--- REDIS ---

REDIS_TAG=5-3.3.0

REDIS_TAG=6-3.3.0

--- NODE ---

NODE_TAG=12-dev-0.34.5

NODE_TAG=10-dev-0.34.5

NODE_TAG=8-dev-0.34.5

--- VARNISH ---

VARNISH_TAG=6.0-4.4.6

VARNISH_TAG=4.1-4.4.6

--- POSTGRESQL ----

POSTGRES_TAG=12-1.9.3

POSTGRES_TAG=11-1.9.3

POSTGRES_TAG=10-1.9.3

POSTGRES_TAG=9.6-1.9.3

POSTGRES_TAG=9.5-1.9.3

POSTGRES_TAG=9.4-1.9.3

OTHERS

ADMINER_TAG=4-3.9.11 APACHE_TAG=2.4-4.2.6 ATHENAPDF_TAG=2.10.0 DRUPAL_NODE_TAG=1.0-2.0.0 MEMCACHED_TAG=1-2.5.5 OPENSMTPD_TAG=6.0-1.6.5 RSYSLOG_TAG=latest SELENIUM_CHROME_TAG=3.141 WEBGRIND_TAG=1-1.15.5 XHPROF_TAG=2.2.4

docker-compose.yml

ersion: "3"

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.

  - ./db:/var/lib/mysql # Use bind mount

php: image: wodby/drupal-php:$PHP_TAG container_name: "${PROJECT_NAME}_php" environment: PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025

PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S opensmtpd:25

  DB_HOST: $DB_HOST
  DB_PORT: $DB_PORT
  DB_USER: $DB_USER
  DB_PASSWORD: $DB_PASSWORD
  DB_NAME: $DB_NAME
  DB_DRIVER: $DB_DRIVER
  PHP_FPM_USER: wodby
  PHP_FPM_GROUP: wodby
  COLUMNS: 80 # Set 80 columns for docker exec -it.

Read instructions at https://wodby.com/docs/stacks/php/local/#xdebug

PHP_XDEBUG: 1

PHP_XDEBUG_DEFAULT_ENABLE: 1

PHP_XDEBUG_REMOTE_CONNECT_BACK: 0

PHP_IDE_CONFIG: serverName=my-ide

PHP_XDEBUG_IDEKEY: "my-ide"

PHP_XDEBUG_REMOTE_HOST: host.docker.internal # Docker 18.03+ Mac/Win

PHP_XDEBUG_REMOTE_HOST: 172.17.0.1 # Linux

PHP_XDEBUG_REMOTE_HOST: 10.254.254.254 # macOS, Docker < 18.03

PHP_XDEBUG_REMOTE_HOST: 10.0.75.1 # Windows, Docker < 18.03

PHP_XDEBUG_REMOTE_LOG: /tmp/php-xdebug.log

PHPUnit Drupal testing configurations

SIMPLETEST_BASE_URL: "http://nginx"

SIMPLETEST_DB: "${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}/${DBNAME}#tests"

MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--disable-gpu","--headless"]}}, "http://chrome:9515"]'

volumes:
  - ./:/var/www/html:cached

Alternative for macOS users: docker-sync https://wodby.com/docs/stacks/drupal/local#docker-for-mac

- docker-sync:/var/www/html

For XHProf and Xdebug profiler traces

- files:/mnt/files

nginx: image: wodby/nginx:$NGINX_TAG container_name: "${PROJECT_NAME}_nginx" depends_on:

postgres:

image: wodby/postgres:$POSTGRES_TAG

container_name: "${PROJECT_NAME}_postgres"

stop_grace_period: 30s

environment:

POSTGRES_PASSWORD: $DB_PASSWORD

POSTGRES_DB: $DB_NAME

POSTGRES_USER: $DB_USER

volumes:

- ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here.

- /path/to/postgres/data/on/host:/var/lib/postgresql/data # Use bind mount

apache:

image: wodby/apache:$APACHE_TAG

container_name: "${PROJECT_NAME}_apache"

depends_on:

- php

environment:

APACHE_LOG_LEVEL: debug

APACHE_BACKEND_HOST: php

APACHE_VHOST_PRESET: php

APACHE_DOCUMENT_ROOT: /var/www/html/web

volumes:

- ./:/var/www/html:cached

Alternative for macOS users: docker-sync https://wodby.com/docs/stacks/drupal/local#docker-for-mac

- docker-sync:/var/www/html

labels:

- "traefik.http.routers.${PROJECT_NAME}_apache.rule=Host(${PROJECT_BASE_URL})"

varnish:

image: wodby/varnish:$VARNISH_TAG

container_name: "${PROJECT_NAME}_varnish"

depends_on:

- nginx

environment:

VARNISH_SECRET: secret

VARNISH_BACKEND_HOST: nginx

VARNISH_BACKEND_PORT: 80

VARNISH_CONFIG_PRESET: drupal

VARNISH_ALLOW_UNRESTRICTED_PURGE: 1

labels:

- "traefik.http.services.${PROJECT_NAME}_varnish.loadbalancer.server.port=6081"

- "traefik.http.routers.${PROJECT_NAME}_varnish.rule=Host(varnish.${PROJECT_BASE_URL})"

redis:

container_name: "${PROJECT_NAME}_redis"

image: wodby/redis:$REDIS_TAG

adminer: container_name: "${PROJECT_NAME}_adminer" image: wodby/adminer:$ADMINER_TAG environment:

For PostgreSQL:

ADMINER_DEFAULT_DB_DRIVER: pgsql

  ADMINER_DEFAULT_DB_HOST: $DB_HOST
  ADMINER_DEFAULT_DB_NAME: $DB_NAME
labels:
  - "traefik.http.routers.${PROJECT_NAME}_adminer.rule=Host(`adminer.${PROJECT_BASE_URL}`)"

pma:

image: phpmyadmin/phpmyadmin

container_name: "${PROJECT_NAME}_pma"

environment:

PMA_HOST: $DB_HOST

PMA_USER: $DB_USER

PMA_PASSWORD: $DB_PASSWORD

UPLOAD_LIMIT: 1G

labels:

- "traefik.http.routers.${PROJECT_NAME}_pma.rule=Host(pma.${PROJECT_BASE_URL})"

solr:

image: wodby/solr:$SOLR_TAG

container_name: "${PROJECT_NAME}_solr"

environment:

SOLR_DEFAULT_CONFIG_SET: $SOLR_CONFIG_SET

SOLR_HEAP: 1024m

labels:

- "traefik.http.routers.${PROJECT_NAME}_solr.rule=Host(solr.${PROJECT_BASE_URL})"

drupal-node:

image: wodby/drupal-node:$DRUPAL_NODE_TAG

container_name: "${PROJECT_NAME}_drupal_nodejs"

labels:

- "traefik.http.routers.${PROJECT_NAME}_drupal_node.rule=Host(drupal_node.${PROJECT_BASE_URL})"

environment:

NODE_SERVICE_KEY: node-service-key

memcached:

container_name: "${PROJECT_NAME}_memcached"

image: wodby/memcached:$MEMCACHED_TAG

rsyslog:

container_name: "${PROJECT_NAME}_rsyslog"

image: wodby/rsyslog:$RSYSLOG_TAG

athenapdf:

image: arachnysdocker/athenapdf-service:$ATHENAPDF_TAG

container_name: "${PROJECT_NAME}_athenapdf"

environment:

WEAVER_AUTH_KEY: weaver-auth-key

WEAVER_ATHENA_CMD: "athenapdf -S"

WEAVER_MAX_WORKERS: 10

WEAVER_MAX_CONVERSION_QUEUE: 50

WEAVER_WORKER_TIMEOUT: 90

WEAVER_CONVERSION_FALLBACK: "false"

node:

image: wodby/node:$NODE_TAG

container_name: "${PROJECT_NAME}_node"

working_dir: /var/www/html/path/to/theme/to/build

labels:

- "traefik.http.services.${PROJECT_NAME}_node.loadbalancer.server.port=3000"

- "traefik.http.routers.${PROJECT_NAME}_node.rule=Host(node.${PROJECT_BASE_URL})"

expose:

- "3000"

volumes:

- ./:/var/www/html

command: sh -c 'yarn install && yarn run start'

blackfire:

image: blackfire/blackfire

container_name: "${PROJECT_NAME}_blackfire"

environment:

BLACKFIRE_SERVER_ID: XXXXX

BLACKFIRE_SERVER_TOKEN: YYYYY

webgrind:

image: wodby/webgrind:$WEBGRIND_TAG

container_name: "${PROJECT_NAME}_webgrind"

environment:

WEBGRIND_PROFILER_DIR: /mnt/files/xdebug/profiler

labels:

- "traefik.http.routers.${PROJECT_NAME}_webgrind.rule=Host(webgrind.${PROJECT_BASE_URL})"

volumes:

- files:/mnt/files

elasticsearch:

image: wodby/elasticsearch:$ELASTICSEARCH_TAG

container_name: "${PROJECT_NAME}_elasticsearch"

environment:

ES_JAVA_OPTS: "-Xms500m -Xmx500m"

ulimits:

memlock:

soft: -1

hard: -1

kibana:

image: wodby/kibana:$KIBANA_TAG

container_name: "${PROJECT_NAME}_kibana"

depends_on:

- elasticsearch

labels:

- "traefik.http.services.${PROJECT_NAME}_kibana.loadbalancer.server.port=5601"

- "traefik.http.routers.${PROJECT_NAME}_kibana.rule=Host(kibana.${PROJECT_BASE_URL})"

opensmtpd:

container_name: "${PROJECT_NAME}_opensmtpd"

image: wodby/opensmtpd:$OPENSMTPD_TAG

xhprof:

image: wodby/xhprof:$XHPROF_TAG

container_name: "${PROJECT_NAME}_xhprof"

restart: always

volumes:

- files:/mnt/files

labels:

- "traefik.http.routers.${PROJECT_NAME}_xhprof.rule=Host(xhprof.${PROJECT_BASE_URL})"

chrome:

image: selenium/standalone-chrome:$SELENIUM_CHROME_TAG

container_name: "${PROJECT_NAME}_chrome"

volumes:

- /dev/shm:/dev/shm

entrypoint:

- chromedriver

- "--no-sandbox"

- "--disable-dev-shm-usage"

- "--log-path=/tmp/chromedriver.log"

- "--verbose"

- "--whitelisted-ips="

portainer:

image: portainer/portainer

container_name: "${PROJECT_NAME}_portainer"

command: --no-auth -H unix:///var/run/docker.sock

volumes:

- /var/run/docker.sock:/var/run/docker.sock

labels:

- "traefik.http.routers.${PROJECT_NAME}_portainer.rule=Host(portainer.${PROJECT_BASE_URL})"

traefik: image: traefik:v2.0 container_name: "${PROJECT_NAME}_traefik" command: --api.insecure=true --providers.docker ports:

volumes:

Docker-sync for macOS users

docker-sync:

external: true

For Xdebug profiler

files:

docker-sync.yml

version: "2"

syncs: docker-sync: src: './' sync_userid: '501' sync_excludes: ['.gitignore', '.git/', '.idea/']

docker-sync-another-project:

src: '/absolute/path/to/project/codebase'

sync_userid: '501'

sync_excludes: ['.gitignore', '.git/', '.idea/']

docker-compose.override.yml

version: "3"

services: php: image: wodby/drupal:$DRUPAL_TAG environment: PHP_FPM_CLEAR_ENV: "no" volumes:

volumes: codebase:

Makefile

include .env

default: up

COMPOSER_ROOT ?= /var/www/html DRUPAL_ROOT ?= /var/www/html/web

help : Print commands help.

.PHONY: help ifneq (,$(wildcard docker.mk)) help : docker.mk @sed -n 's/^##//p' $< else help : Makefile @sed -n 's/^##//p' $< endif

up : Start up containers.

.PHONY: up up: @echo "Starting up containers for $(PROJECT_NAME)..." docker-compose pull docker-compose up -d --remove-orphans

down : Stop containers.

.PHONY: down down: stop

start : Start containers without updating.

.PHONY: start start: @echo "Starting containers for $(PROJECT_NAME) from where you left off..." @docker-compose start

stop : Stop containers.

.PHONY: stop stop: @echo "Stopping containers for $(PROJECT_NAME)..." @docker-compose stop

prune : Remove containers and their volumes.

You can optionally pass an argument with the service name to prune single container

prune mariadb : Prune mariadb container and remove its volumes.

prune mariadb solr : Prune mariadb and solr containers and remove their volumes.

.PHONY: prune prune: @echo "Removing containers for $(PROJECT_NAME)..." @docker-compose down -v $(filter-out $@,$(MAKECMDGOALS))

ps : List running containers.

.PHONY: ps ps: @docker ps --filter name='$(PROJECT_NAME)*'

shell : Access php container via shell.

.PHONY: shell shell: docker exec -ti -e COLUMNS=$(shell tput cols) -e LINES=$(shell tput lines) $(shell docker ps --filter name='$(PROJECT_NAME)_php' --format "{{ .ID }}") sh

composer : Executes composer command in a specified COMPOSER_ROOT directory (default is /var/www/html).

To use "--flag" arguments include them in quotation marks.

For example: make composer "update drupal/core --with-dependencies"

.PHONY: composer composer: docker exec $(shell docker ps --filter name='^/$(PROJECT_NAME)_php' --format "{{ .ID }}") composer --working-dir=$(COMPOSER_ROOT) $(filter-out $@,$(MAKECMDGOALS))

drush : Executes drush command in a specified DRUPAL_ROOT directory (default is /var/www/html/web).

To use "--flag" arguments include them in quotation marks.

For example: make drush "watchdog:show --type=cron"

.PHONY: drush drush: docker exec $(shell docker ps --filter name='^/$(PROJECT_NAME)_php' --format "{{ .ID }}") drush -r $(DRUPAL_ROOT) $(filter-out $@,$(MAKECMDGOALS))

logs : View containers logs.

You can optinally pass an argument with the service name to limit logs

logs php : View php container logs.

logs nginx php : View nginx and php containers logs.

.PHONY: logs logs: @docker-compose logs -f $(filter-out $@,$(MAKECMDGOALS))

https://stackoverflow.com/a/6273809/1826109

%: @:

oegkava commented 4 years ago

How to attach an archive?

oegkava commented 4 years ago

tppak.zip

oegkava commented 4 years ago

Apparently since version 1.8.29, sudo started outputting this warning in Linux rootless containers:

oegkava commented 4 years ago

mariadb 10.1 OK log out

mailhog_1 | 2020/05/28 17:12:12 Serving under http://0.0.0.0:8025/ php_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted mailhog_1 | Creating API v1 with WebPath: mailhog_1 | Creating API v2 with WebPath: adminer_1 | PHP 7.2.30 Development Server started at Thu May 28 17:12:13 2020 nginx_1 | 2020/05/28 17:12:13 [notice] 1#1: using the "epoll" event method nginx_1 | 2020/05/28 17:12:13 [notice] 1#1: nginx/1.17.10 nginx_1 | 2020/05/28 17:12:13 [notice] 1#1: built by gcc 6.4.0 (Alpine 6.4.0) nginx_1 | 2020/05/28 17:12:13 [notice] 1#1: OS: Linux 4.19.76-linuxkit nginx_1 | 2020/05/28 17:12:13 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576 nginx_1 | 2020/05/28 17:12:13 [notice] 1#1: start worker processes nginx_1 | 2020/05/28 17:12:13 [notice] 1#1: start worker process 37 nginx_1 | 2020/05/28 17:12:13 [notice] 1#1: start worker process 38 mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] /usr/bin/mysqld (mysqld 10.1.44-MariaDB) starting as process 69 ... mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] InnoDB: Using mutexes to ref count buffer pool pages mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] InnoDB: The InnoDB memory heap is disabled mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] InnoDB: Compressed tables use zlib 1.2.11 mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] InnoDB: Using Linux native AIO mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] InnoDB: Using SSE crc32 instructions mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] InnoDB: Initializing buffer pool, size = 128.0M mariadb_1 | 2020-05-28 17:12:13 140467987876744 [Note] InnoDB: Completed initialization of buffer pool mariadb_1 | 2020-05-28 17:12:14 140467987876744 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created! mariadb_1 | 2020-05-28 17:12:14 140467987876744 [Note] InnoDB: Setting file ./ibdata1 size to 10 MB mariadb_1 | 2020-05-28 17:12:14 140467987876744 [Note] InnoDB: Setting log file ./ib_logfile101 size to 128 MB php_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted php_1 | [28-May-2020 17:12:15] NOTICE: fpm is running, pid 1 php_1 | [28-May-2020 17:12:15] NOTICE: ready to handle connections mariadb_1 | 2020-05-28 17:12:15 140467987876744 [Note] InnoDB: Setting log file ./ib_logfile1 size to 128 MB mariadb_1 | 2020-05-28 17:12:18 140467987876744 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 mariadb_1 | 2020-05-28 17:12:18 140467987876744 [Warning] InnoDB: New log files created, LSN=45781 mariadb_1 | 2020-05-28 17:12:18 140467987876744 [Note] InnoDB: Doublewrite buffer not found: creating new mariadb_1 | 2020-05-28 17:12:18 140467987876744 [Note] InnoDB: Doublewrite buffer created mariadb_1 | 2020-05-28 17:12:19 140467987876744 [Note] InnoDB: 128 rollback segment(s) are active. mariadb_1 | 2020-05-28 17:12:19 140467987876744 [Warning] InnoDB: Creating foreign key constraint system tables. mariadb_1 | 2020-05-28 17:12:19 140467987876744 [Note] InnoDB: Foreign key constraint system tables created mariadb_1 | 2020-05-28 17:12:19 140467987876744 [Note] InnoDB: Creating tablespace and datafile system tables. mariadb_1 | 2020-05-28 17:12:19 140467987876744 [Note] InnoDB: Tablespace and datafile system tables created. mariadb_1 | 2020-05-28 17:12:19 140467987876744 [Note] InnoDB: Waiting for purge to start mariadb_1 | 2020-05-28 17:12:19 140467987876744 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.46-86.2 started; log sequence number 0 mariadb_1 | 2020-05-28 17:12:19 140467401333480 [Note] InnoDB: Dumping buffer pool(s) not yet started mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] /usr/bin/mysqld (mysqld 10.1.44-MariaDB) starting as process 97 ... mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Using mutexes to ref count buffer pool pages mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: The InnoDB memory heap is disabled mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: GCC builtin atomic_thread_fence() is used for memory barrier mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Compressed tables use zlib 1.2.11 mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Using Linux native AIO mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Using SSE crc32 instructions mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Initializing buffer pool, size = 128.0M mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Completed initialization of buffer pool mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Highest supported file format is Barracuda. mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: 128 rollback segment(s) are active. mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Waiting for purge to start mariadb_1 | 2020-05-28 17:12:23 140695656463240 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.46-86.2 started; log sequence number 1616730 mariadb_1 | 2020-05-28 17:12:23 140695077006056 [Note] InnoDB: Dumping buffer pool(s) not yet started mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] /usr/bin/mysqld (mysqld 10.1.44-MariaDB) starting as process 126 ... mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: Using mutexes to ref count buffer pool pages mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: The InnoDB memory heap is disabled mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: GCC builtin atomic_thread_fence() is used for memory barrier mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: Compressed tables use zlib 1.2.11 mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: Using Linux native AIO mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: Using SSE crc32 instructions mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: Initializing buffer pool, size = 128.0M mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: Completed initialization of buffer pool mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: Highest supported file format is Barracuda. mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: 128 rollback segment(s) are active. mariadb_1 | 2020-05-28 17:12:30 140029065673608 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.46-86.2 started; log sequence number 1616740 mariadb_1 | 2020-05-28 17:12:30 140028486970088 [Note] InnoDB: Dumping buffer pool(s) not yet started mariadb_1 | mariadb_1 | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! mariadb_1 | To do so, start the server, then issue the following commands: mariadb_1 | mariadb_1 | '/usr/bin/mysqladmin' -u root password 'new-password' mariadb_1 | '/usr/bin/mysqladmin' -u root -h password 'new-password' mariadb_1 | mariadb_1 | Alternatively you can run: mariadb_1 | '/usr/bin/mysql_secure_installation' mariadb_1 | mariadb_1 | which will also give you the option of removing the test mariadb_1 | databases and anonymous user created by default. This is mariadb_1 | strongly recommended for production servers. mariadb_1 | mariadb_1 | See the MariaDB Knowledgebase at http://mariadb.com/kb or the mariadb_1 | MySQL manual for more instructions. mariadb_1 | mariadb_1 | Please report any problems at http://mariadb.org/jira mariadb_1 | mariadb_1 | The latest information about MariaDB is available at http://mariadb.org/. mariadb_1 | You can find additional information about the MySQL part at: mariadb_1 | http://dev.mysql.com mariadb_1 | Consider joining MariaDB's strong and vibrant community: mariadb_1 | https://mariadb.org/get-involved/ mariadb_1 | mariadb_1 | Database initialized mariadb_1 | MySQL init process in progress... mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] mysqld (mysqld 10.1.44-MariaDB) starting as process 159 ... mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] InnoDB: Using mutexes to ref count buffer pool pages mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] InnoDB: The InnoDB memory heap is disabled mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] InnoDB: GCC builtin atomic_thread_fence() is used for memory barrier mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] InnoDB: Compressed tables use zlib 1.2.11 mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] InnoDB: Using Linux native AIO mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] InnoDB: Using SSE crc32 instructions mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] InnoDB: Initializing buffer pool, size = 128.0M mariadb_1 | 2020-05-28 17:12:33 140460047113096 [Note] InnoDB: Completed initialization of buffer pool mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Note] InnoDB: Highest supported file format is Barracuda. mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Note] InnoDB: 128 rollback segment(s) are active. mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Note] InnoDB: Waiting for purge to start mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.46-86.2 started; log sequence number 1616750 mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Note] Plugin 'FEEDBACK' is disabled. mariadb_1 | 2020-05-28 17:12:34 140459467655912 [Note] InnoDB: Dumping buffer pool(s) not yet started mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Warning] 'user' entry 'root@8e4465a4adbc' ignored in --skip-name-resolve mode. mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Warning] 'user' entry '@8e4465a4adbc' ignored in --skip-name-resolve mode. mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Warning] 'proxies_priv' entry '@% root@8e4465a4adbc' ignored in --skip-name-resolve mode. mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Note] Reading of all Master_info entries succeeded mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Note] Added new Master_info '' to hash table mariadb_1 | 2020-05-28 17:12:34 140460047113096 [Note] mysqld: ready for connections. mariadb_1 | Version: '10.1.44-MariaDB' socket: '/var/run/mysqld/mysqld.sock' port: 0 MariaDB Server mariadb_1 | 2020-05-28 17:12:49 140459466803944 [Warning] 'proxies_priv' entry '@% root@8e4465a4adbc' ignored in --skip-name-resolve mode. mariadb_1 | mariadb_1 | 2020-05-28 17:12:49 140459466484456 [Note] mysqld: Normal shutdown mariadb_1 | 2020-05-28 17:12:49 140459466484456 [Note] Event Scheduler: Purging the queue. 0 events mariadb_1 | 2020-05-28 17:12:49 140459468032744 [Note] InnoDB: FTS optimize thread exiting. mariadb_1 | 2020-05-28 17:12:49 140459466484456 [Note] InnoDB: Starting shutdown... mariadb_1 | 2020-05-28 17:12:50 140459466484456 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool mariadb_1 | 2020-05-28 17:12:51 140459466484456 [Note] InnoDB: Shutdown completed; log sequence number 1616760 mariadb_1 | 2020-05-28 17:12:51 140459466484456 [Note] mysqld: Shutdown complete mariadb_1 | mariadb_1 | mariadb_1 | MySQL init process done. Ready for start up. mariadb_1 | mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] mysqld (mysqld 10.1.44-MariaDB) starting as process 1 ... mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Using mutexes to ref count buffer pool pages mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: The InnoDB memory heap is disabled mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: GCC builtin atomic_thread_fence() is used for memory barrier mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Compressed tables use zlib 1.2.11 mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Using Linux native AIO mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Using SSE crc32 instructions mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Initializing buffer pool, size = 128.0M mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Completed initialization of buffer pool mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Highest supported file format is Barracuda. mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: 128 rollback segment(s) are active. mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Waiting for purge to start mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.46-86.2 started; log sequence number 1616760 mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] Plugin 'FEEDBACK' is disabled. mariadb_1 | 2020-05-28 17:12:52 140703986186984 [Note] InnoDB: Dumping buffer pool(s) not yet started mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] Server socket created on IP: '0.0.0.0'. mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Warning] 'proxies_priv' entry '@% root@8e4465a4adbc' ignored in --skip-name-resolve mode. mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] Reading of all Master_info entries succeeded mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] Added new Master_info '' to hash table mariadb_1 | 2020-05-28 17:12:52 140704565644168 [Note] mysqld: ready for connections. mariadb_1 | Version: '10.1.44-MariaDB' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MariaDB Server mailhog_1 | [APIv1] KEEPALIVE /api/v1/events

csandanov commented 4 years ago

Please use English. And please format your code messages.