Hey Jason and thanks for getting back. This is what I have in docker-compose (as part of a file that starts the entire stack and more):
# FLEET_CONFIG_ID - config related to new token [defaul]
# FLEET_ENROLLMENT_TOKEN - existing enrollment token to be used for enroll
# FLEET_ENROLL - if set to 1 enroll will be performed
# FLEET_ENROLL_INSECURE - if set to 1, agent will enroll with fleet using --insecure flag
# FLEET_SETUP - if set to 1 fleet setup will be performed
# FLEET_TOKEN_NAME - token name for a token to be created
# KIBANA_HOST - actual kibana host [http://localhost:5601]
# KIBANA_USERNAME - username for accessing kibana API [elastic]
# KIBANA_PASSWORD - password for accessing kibana API [changeme]
I find it a bit cumbersome to use in terms of enrolling. I found that just enable enrolling made the agent enroll again and again, so for me it worked to start it once with enrolling disabled, disable and rebuild the container to prevent that. But still the agent is marked as unhealthy and doesn't send any data. I haven't figured out how to extract the config from the beats agents running (filebeat and metricbeat) or even how to manipulate the config. So in that sense I am a bit stuck.
Thanks for link to the environment variables, I'll check it out.