Last active
September 29, 2025 07:56
-
-
Save mrsimonemms/9f580e3ceff9cb366aa1468417e3d748 to your computer and use it in GitHub Desktop.
Auto-create Temporal search attributes in Docker Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| # This is your Temporal workflow app - just an example service for demo | |
| workflow: | |
| image: alpine | |
| command: sleep 3600 | |
| depends_on: | |
| temporal: | |
| condition: service_healthy | |
| temporal: | |
| image: temporalio/temporal | |
| ports: | |
| - 8080:8233 | |
| command: server start-dev --ip 0.0.0.0 --search-attribute YourAttributeName=Keyword --search-attribute Step=Int | |
| healthcheck: | |
| test: ["CMD-SHELL", "temporal operator cluster health"] | |
| interval: 10s | |
| timeout: 10s | |
| retries: 3 | |
| # Display the search-attributes - not necessary in reality | |
| temporal-validate: | |
| image: temporalio/temporal | |
| command: | | |
| operator search-attribute list | |
| restart: on-failure | |
| environment: | |
| TEMPORAL_ADDRESS: temporal:7233 | |
| depends_on: | |
| temporal: | |
| condition: service_healthy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a Docker Compose file which auto-creates the search attributes when you run
docker compose up. In this example, thetemporalserver creates the search attributes at runtime andtemporal-validateprints a list of the search attributes created (you should seeYourAttributeNameandStepadded in there).The
workflowisn't really relevant as that's just a long-running container that represents your actual workflow app (it's just analpinecontainer with asleep 3600for this example - you'll need to replace that)