Wordpress docker log issue?

Hi
I was wondering if someone else has had this issue before,
Using docker wordpress image and been seeing the log file not auto deleting
seeing the files called binlog.xxxx
any ideas how to auto delete those files though the docker compose config or would i need to create a batch script on the host to delete them?

This is my docker config

version: '3.9'

services:
  # Database
  db:
    image: mysql:8.0
    volumes:
      - /wordpress/db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: mypassword
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: mypassword
    networks:
      - wpsite
  # phpmyadmin
  phpmyadmin:
    depends_on:
      - db
    image: phpmyadmin/phpmyadmin
    restart: always
    ports:
      - '8083:80'
    environment:
      PMA_HOST: db
      MYSQL_ROOT_PASSWORD: mypassword
    networks:
      - wpsite
  # Wordpress
  wordpress:
    depends_on:
      - db
    image: wordpress:latest
    ports:
      - '8084:80'
    restart: always
    volumes:
      - /wordpress/html:/var/www/html
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: mypassword
    networks:
      - wpsite
networks:
  wpsite:
volumes:
  db_data:
  html:

I don’t know what binlog is (I found something related to MySQL only), but if these files are generated and you want to ignore them before building your image, you can add those to the .dockerignore file

binlog.*
1 Like

Thank you so much
that did the trick