cc77783b7d
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
Run Tests on Branches / Parapharmacy API Tests (push) Has been skipped
Run Tests on Branches / Detect Changes (push) Successful in 13s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / PIP Platform Tests (push) Has been skipped
23 lines
584 B
Bash
Executable File
23 lines
584 B
Bash
Executable File
#!/bin/sh
|
|
# One-shot init: import workflows into n8n on first deploy.
|
|
# Skips if already imported (flag file in shared volume).
|
|
set -e
|
|
|
|
FLAG="/home/node/.n8n/.workflows-imported"
|
|
|
|
if [ -f "$FLAG" ]; then
|
|
echo "[n8n-init] Workflows already imported, skipping."
|
|
exit 0
|
|
fi
|
|
|
|
echo "[n8n-init] Waiting for n8n to be ready..."
|
|
until wget -qO /dev/null http://n8n:5678/healthz 2>/dev/null; do
|
|
sleep 2
|
|
done
|
|
|
|
echo "[n8n-init] Importing workflows from /home/node/workflows/..."
|
|
n8n import:workflow --separate --input=/home/node/workflows/
|
|
|
|
touch "$FLAG"
|
|
echo "[n8n-init] Import complete."
|