visiblevc / wordpress-starter

A slightly less shitty wordpress development workflow
688 stars 167 forks source link

MariaDB "aborted connection" #166

Open yanickvanbarneveld opened 4 years ago

yanickvanbarneveld commented 4 years ago

Hi there,

When starting a project with MariaDB and the VisibleVC, WordPress is stuck on "Waiting to initialize MySQL".

I think it is because MariaDB won't start up, the error I am getting over here is: 2019-11-27 10:59:06 121 [Warning] Aborted connection 121 to db: 'unconnected' user: 'unauthenticated' host: '172.19.0.2' (This connection closed normally without authentication)

My Docker-compose file looks like:

services:
  wordpress:
    image: visiblevc/wordpress:latest
    cap_add:
      - SYS_ADMIN
    devices:
      - /dev/fuse
    security_opt:
      - apparmor:unconfined
    ports:
      - 8080:80
      - 443:443
    environment:
      DB_NAME: wordpress
      DB_PASS: root
      WP_LOCALE: 'nl_NL'
      WP_DEBUG: 'true'
      WP_DEBUG_DISPLAY: 'true'
    volumes:
      - ./../data:/data
      - ./../build/themes:/app/wp-content/themes
      - ./../build/uploads:/app/wp-content/uploads
      - ./../build/plugins:/app/wp-content/plugins
  db:
    image: mariadb:10
    volumes:
      - data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    ports:
      - 8000:80
  mailhog:
    image: mailhog/mailhog
    depends_on:
      - wordpress
    ports:
      - "1025:1025"
      - "8025:8025"
volumes:
  data: null

Anyone have an idea?

dsifford commented 4 years ago

What version of the image are you using?

yanickvanbarneveld commented 4 years ago

@dsifford What version do you mean? I just downloaded the latest image of both (VisibleVC and MariaDB).

dsifford commented 4 years ago

In your compose file you have the image listed as visiblevc/wordpress:latest which is ambiguous and could be any of the previously pushed tags, depending on how long ago you pulled the image from dockerhub.

yanickvanbarneveld commented 4 years ago

visiblevc/wordpress latest sha256:6efd75df6d0233ac1054855159a37b9a88d963362d8e919eb2e18fa91961c444 b4b8f8bb9e95 6 months ago 799MB

mariadb 10 sha256:3ce0da3d4d794f9b3692627c9b97b1f22d8c680ddde9bd17839d134b3ab30b07 2ef19234ff46 3 weeks ago 356MB

Can you do anything with above?

dsifford commented 4 years ago

If you'd like to continue using the latest tag, that's fine but you'd need to do a docker pull visiblevc/wordpress to get the actual latest image that I pushed out last week.

I'd recommend using a specific tag number though to avoid the ambiguity.

Try pulling the latest image down and let me know if that works or not.

yanickvanbarneveld commented 4 years ago

@dsifford Ah, didn't know that, that's why I have a different version than my colleagues. So it is better to use something like:

image: visiblevc/wordpress:sha256-59a303ad4fdeb24319be96726691a3cce8511ac964dec0fa4b0d0a2d67dd2010

dsifford commented 4 years ago

Here's the available formats: https://github.com/visiblevc/wordpress-starter#available-images

I personally use <version>-php7.3. So right now, it's visiblevc/wordpress:0.25.0-php7.3