Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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