diff --git a/docker-compose.yaml b/docker-compose.yaml index 9151611..9d8b0a1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -168,6 +168,7 @@ services: temporal-postgresql: container_name: temporal-postgresql image: postgres:16 + restart: always environment: POSTGRES_PASSWORD: temporal POSTGRES_USER: temporal @@ -175,15 +176,26 @@ services: - temporal-network expose: - 5432 + healthcheck: + test: ["CMD-SHELL", "pg_isready -U temporal"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 10s volumes: - - /var/lib/postgresql/data - + - temporal-postgres-data:/var/lib/postgresql/data + temporal: container_name: temporal + restart: always + ports: + - '7233:7233' image: temporalio/auto-setup:1.28.1 depends_on: - - temporal-postgresql - - temporal-elasticsearch + temporal-postgresql: + condition: service_healthy + temporal-elasticsearch: + condition: service_healthy environment: - DB=postgres12 - DB_PORT=5432 @@ -197,8 +209,14 @@ services: - TEMPORAL_NAMESPACE=default networks: - temporal-network + healthcheck: + test: ["CMD", "temporal", "operator", "cluster", "health", "--address", "temporal:7233"] + interval: 10s + timeout: 5s + retries: 10 + start_period: 30s volumes: - - ./dynamicconfig:/etc/temporal/config/dynamicconfig + - /opt/postiz/dynamicconfig:/etc/temporal/config/dynamicconfig labels: kompose.volume.type: configMap @@ -243,6 +261,9 @@ volumes: postiz-uploads: external: false + temporal-postgres-data: + external: false + temporal-elasticsearch-data: external: false