Skip to content

Commit

Permalink
init temporal search attribute (#1943)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uros Marolt authored Dec 11, 2023
1 parent 1a5d211 commit c894429
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/scaffold/temporal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ ENV PATH /root/.temporalio/bin:$PATH

EXPOSE 7233 8233

ENTRYPOINT ["temporal", "server", "start-dev", "--ip", "0.0.0.0"]
COPY ./entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
27 changes: 27 additions & 0 deletions scripts/scaffold/temporal/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

temporal server start-dev --ip 0.0.0.0 &

# Function to check if Temporal is ready
check_temporal_ready() {
# Execute the Temporal health check command
temporal operator cluster health

# Return the exit status of the health check command
return $?
}

# Wait for Temporal server to be ready
echo "Waiting for Temporal server to be ready..."
until check_temporal_ready; do
printf '.'
sleep 1
done
echo "Temporal server is ready."

# Run Temporal setup command
temporal operator search-attribute create --name TenantId --type Text --namespace default

# Keep the container running after setup
# (This could be tailing logs or just a sleep loop)
tail -f /dev/null

0 comments on commit c894429

Please sign in to comment.