mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-30 14:52:27 -05:00
deploy-node-windows added and new S4DS Node name
This commit is contained in:
parent
bd868dcc2b
commit
fd1cae8b70
2 changed files with 47 additions and 2 deletions
45
deploy-node-windows.sh
Normal file
45
deploy-node-windows.sh
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit immediately if a command fails.
|
||||
set -e
|
||||
|
||||
##############################
|
||||
# Step 0: Get Package Name
|
||||
##############################
|
||||
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
||||
|
||||
if [ -z "$PACKAGE_NAME" ]; then
|
||||
echo "❌ Error: Could not determine package name from package.json."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "📦 Detected package name: '$PACKAGE_NAME'"
|
||||
|
||||
##############################
|
||||
# Step 1: Build the Node
|
||||
##############################
|
||||
echo "🔨 Building the node..."
|
||||
pnpm run build
|
||||
|
||||
##############################
|
||||
# Step 2: Deploy the Build Output
|
||||
##############################
|
||||
SOURCE_DIR="D:\\Users\\aleja\\Code\\n8n-nodes-starter-s4ds\\dist"
|
||||
|
||||
echo "🚀 Deploying build output from '$SOURCE_DIR' to Docker volume..."
|
||||
|
||||
docker run --rm \
|
||||
-v n8n-nodes-starter-s4ds_n8n_data:/data \
|
||||
-v "${SOURCE_DIR}:/build" \
|
||||
alpine sh -c "mkdir -p /data/custom/$PACKAGE_NAME && cp -r /build/* /data/custom/$PACKAGE_NAME/"
|
||||
|
||||
echo "✅ Deployment complete."
|
||||
|
||||
##############################
|
||||
# Step 3: Restart n8n
|
||||
##############################
|
||||
echo "♻️ Restarting n8n container..."
|
||||
docker container restart n8n-nodes-starter-s4ds-n8n-1
|
||||
|
||||
echo "📄 Streaming logs..."
|
||||
docker logs -f n8n-nodes-starter-s4ds-n8n-1
|
||||
Loading…
Add table
Add a link
Reference in a new issue