Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot follow tutorial due to incompatible docker-compose.yml #304

Closed
marlowpayne opened this issue Aug 19, 2021 · 1 comment
Closed

Cannot follow tutorial due to incompatible docker-compose.yml #304

marlowpayne opened this issue Aug 19, 2021 · 1 comment

Comments

@marlowpayne
Copy link

Looking at current issues, this may be part of #290, but requires code changes, so I'm logging here.

Note: I was using the internal dev tool, but as far as I can tell this issue will occur for external users too.

Machine setup:

Docker Desktop version 3.6.0 (67351)
Screen Shot 2021-08-19 at 10 22 49 AM

Steps

  1. Clone the repo and cd to it
  2. Run dev up, docker-compose up -d, or docker-compose up -d mysql-1 mysql-2 as part of first tutorial step ("Setup and Seed MySQL")

Result

Nothing happens. Error displayed: (root) Additional property mysql-1 is not allowed

Expected

mysql-1 and mysql-2 pulled and containers started. Tutorial can proceed.

Findings + Workaround

This issue looks like it may be caused by a deprecated docker-compose.yml format/syntax:
https://docs.docker.com/compose/compose-file/compose-versioning/#version-1-deprecated

I was able to workaround and proceed by minimally changing docker-compose.yml to nest all entries under a top-level services: key:

services:
  mysql-1:
    image: percona:5.7
    command: --server-id=1
      --log-bin=mysql-bin
      --max-binlog-size=4096
      --binlog-format=ROW
      --sync-binlog=1
      --log-slave-updates=ON
      --gtid-mode=ON
      --enforce-gtid-consistency=ON
      --character-set-server=utf8mb4
      --collation-server=utf8mb4_unicode_ci
      --max-connections=1000
      --read-only=OFF
      --binlog-rows-query-log-events=ON
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
    volumes:
      - /var/lib/mysql
    ports:
      - "29291:3306"

  mysql-2:
    image: percona:5.7
    command: --server-id=2
      --log-bin=mysql-bin
      --binlog-format=ROW
      --max-binlog-size=4096
      --sync-binlog=1
      --log-slave-updates=ON
      --gtid-mode=ON
      --enforce-gtid-consistency=ON
      --character-set-server=utf8mb4
      --collation-server=utf8mb4_unicode_ci
      --max-connections=1000
      --binlog-rows-query-log-events=ON
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
    volumes:
      - /var/lib/mysql
    ports:
      - "29292:3306"

  mysql-3:
    image: percona:5.7
    command: --server-id=3
      --log-bin=mysql-bin
      --binlog-format=ROW
      --max-binlog-size=4096
      --sync-binlog=1
      --log-slave-updates=ON
      --gtid-mode=ON
      --enforce-gtid-consistency=ON
      --character-set-server=utf8mb4
      --collation-server=utf8mb4_unicode_ci
      --max-connections=1000
      --binlog-rows-query-log-events=ON
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
    volumes:
      - /var/lib/mysql
    ports:
      - "29293:3306"
@coding-chimp
Copy link
Contributor

Should be fixed with #239.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants