version: '3'
services:
  db:
    image: mysql:latest
    environment:
      - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}"
      - "MYSQL_USER=${MYSQL_USER}"
      - "MYSQL_PASSWORD=${MYSQL_PASSWORD}"
      - "MYSQL_DATABASE=${MYSQL_DATABASE}"
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --default_authentication_plugin=mysql_native_password
    volumes:
      - db_data:/var/lib/mysql
    healthcheck:
      test: sh -c 'echo "SELECT 1" | mysql -u "${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -s "${MYSQL_DATABASE}" >/dev/null 2>&1'
  web:
    image: shakiyam/bbs
    depends_on:
      - db
    ports:
      - '4567:4567'
    environment:
      - "DB_USER=${MYSQL_USER}"
      - "DB_PASSWORD=${MYSQL_PASSWORD}"
      - DB_HOST=db
      - DB_PORT=3306
      - "DB_DATABASE=${MYSQL_DATABASE}"
volumes:
  db_data:

version: '3'
services:
  db:
    image: mysql/mysql-server:latest
    environment:
      - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}"
      - "MYSQL_USER=${MYSQL_USER}"
      - "MYSQL_PASSWORD=${MYSQL_PASSWORD}"
      - "MYSQL_DATABASE=${MYSQL_DATABASE}"
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --default_authentication_plugin=mysql_native_password
    volumes:
      - db_data:/var/lib/mysql
    healthcheck:
      test: sh -c 'echo "SELECT 1" | mysql -u "${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -s "${MYSQL_DATABASE}" >/dev/null 2>&1'
  web:
    image: shakiyam/bbs
    depends_on:
      - db
    ports:
      - '4567:4567'
    environment:
      - "DB_USER=${MYSQL_USER}"
      - "DB_PASSWORD=${MYSQL_PASSWORD}"
      - DB_HOST=db
      - DB_PORT=3306
      - "DB_DATABASE=${MYSQL_DATABASE}"
volumes:
  db_data:

Change the MySQL image since there is no official ARM version.
Change the MySQL image since there is no official ARM version.
