Skip to content

Commit e4425d7

Browse files
committed
try waiting a bit
1 parent 1a1ae59 commit e4425d7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ jobs:
156156
python -m pip install '.[test]'
157157
- name: Run RStudio Connect
158158
run: |
159-
docker compose up --build -d
160159
pip freeze > requirements.txt
161160
make dev
162161
env:

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,16 @@ promote-docs-in-s3:
156156
RSC_API_KEYS=vetiver-testing/rsconnect_api_keys.json
157157

158158
dev:
159-
docker compose up -d
160-
# Docker compose needs a little time to start up
161-
sleep 4
159+
docker compose up --build -d
160+
@echo "Waiting for Connect to be ready..."
161+
@for i in $$(seq 1 50); do \
162+
if docker compose exec -T rsconnect echo "ready" 2>/dev/null; then \
163+
echo "Connect is ready!"; \
164+
break; \
165+
fi; \
166+
echo "Attempt $$i/30: Container not ready, waiting..."; \
167+
sleep 5; \
168+
done
162169
docker compose exec -T rsconnect bash < vetiver-testing/setup-rsconnect/add-users.sh
163170
python vetiver-testing/setup-rsconnect/dump_api_keys.py $(RSC_API_KEYS)
164171

0 commit comments

Comments
 (0)