ame-job-manager/entrypoint.sh
Claude 67533c1b24 simplify: Remove unnecessary bind-mounts in entrypoint
- Docker-compose already handles the bind-mounts via volumes config
- Entrypoint now just creates subdirectories and verifies access
- Removes 'Could not bind' warnings that were noise
- Cleaner startup logs

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-31 16:28:44 -04:00

37 lines
1 KiB
Bash
Executable file

#!/bin/bash
set -e
echo "=== AME Remote Job Manager — Entrypoint ==="
# Mount points from docker-compose.yml bind-mounts
SMB_SHARE="/smb-share"
WATCH_DIR="/watch"
OUTPUT_DIR="/output"
LOGS_DIR="/ame-logs"
# Check if SMB share is mounted
if [ ! -d "$SMB_SHARE" ]; then
echo "⚠ SMB share not mounted at $SMB_SHARE"
echo " Ensure the host has mounted: sudo mount -t cifs //172.18.210.5/ame /mnt/smb-ame"
mkdir -p "$WATCH_DIR" "$OUTPUT_DIR" "$LOGS_DIR"
echo "Created fallback local directories"
else
echo "✓ SMB share mounted at $SMB_SHARE"
# Create subdirectories if they don't exist
mkdir -p "$SMB_SHARE/watch" "$SMB_SHARE/output" "$SMB_SHARE/logs"
echo "✓ Subdirectories ready"
fi
# Verify paths are accessible (docker-compose handles the bind-mounts)
echo "Verifying mount points..."
for dir in "$WATCH_DIR" "$OUTPUT_DIR" "$LOGS_DIR"; do
if [ -d "$dir" ]; then
echo "$dir is accessible"
else
echo "$dir not accessible"
fi
done
echo "Starting Node.js application..."
exec node server.js