Mysql max_allowed_packet configuration


This seems like something that should be obvious, but I haven’t been able to find anything. I’m inserting into a Mysql database and getting the ERROR 2006 (HY000) at line 163385: MySQL server has gone away error, which I’m pretty sure is because some packet in my database is too large for the default settings.

I want to increase the max_allowed_packet config on the database. I’ve tried the following, which does not appear to work:

            - image: circleci/php:7.2-node
            - image: mysql:5.6
              name: "primary_test"
                  - MAX_ALLOWED_PACKET=64M

I guess the next step is to create a my.cnf files and put it in the right spot, but that seems like overkill. Is there a container environment variable I can set to do this? And, how does one discover the available variables for a container? (teach a man to fish and all that)