I am using docker compose from here GitHub - tsurdilo/my-temporal-dockercompose: my custom docker compose for temporal to run my temporal server. Workflows are running fine, but when I restart temporal all containers using docker compose, I don’t see any past running workflows. Also verified from command line and they are not there.
Do I need to add some setting to keep workflow history?
Note: I have modified compose file as per my needs. Also, I am using opensearch instead of ElasticSearch
I am able to see values are present in executions
table in temporal db (Postgres)
select * from executions;
After some investigation it seems like if I restart opensearch container only then workflows are missing from temporal UI
OpenSearch Docker compose
version: "3.5"
x-logging: &logging
logging:
driver: loki
options:
loki-url: "http://host.docker.internal:3100/loki/api/v1/push"
mode: non-blocking
max-buffer-size: 4m
loki-retries: "3"
services:
xsearch:
<<: *logging
container_name: temporal-opensearch
environment:
- discovery.type=single-node
- OPENSEARCH_JAVA_OPTS=-Xms256m -Xmx256m
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
- cluster.routing.allocation.disk.watermark.high=256mb
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
- plugins.security.disabled=true
image: opensearchproject/opensearch:${OPENSEARCH_IMG}
ulimits:
# memlock:
# soft: -1 # Set memlock to unlimited (no soft or hard limit)
# hard: -1
nofile:
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
hard: 65536
ports:
- published: 9200
target: 9200
volumes:
- /usr/share/opensearch/data