This is the docker compose file I used to connect to mysql running locally (note it uses auto-setup image):
version: "3.5"
services:
temporal:
container_name: temporal
environment:
- DB=mysql
- DB_PORT=3307
- MYSQL_USER=user
- MYSQL_PWD=pass
- MYSQL_SEEDS=host.docker.internal
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development_es.yaml
- ENABLE_ES=false
- PROMETHEUS_ENDPOINT=0.0.0.0:8000
image: temporalio/auto-setup:1.16.2
ports:
- 7233:7233
- 8000:8000
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:
- temporal
environment:
- TEMPORAL_CLI_ADDRESS=temporal:7233
image: temporalio/admin-tools:1.16.2
stdin_open: true
tty: true
temporal-ui:
container_name: temporal-ui
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
image: temporalio/ui:latest
ports:
- 8080:8080
temporal-web:
container_name: temporal-web
depends_on:
- temporal
environment:
- TEMPORAL_GRPC_ENDPOINT=temporal:7233
- TEMPORAL_PERMIT_WRITE_API=true
- TEMPORAL_GRPC_MAX_MESSAGE_LENGTH=67108864
image: temporalio/web:1.14.0
ports:
- 8088:8088
Note I used MYSQL_SEEDS=host.docker.internal cause running on mac and mysql was running on localhost.
You can reference the config template to see how certain env vars are mapped and their defaults.