Files
email-api/start.sh
cproudlock 5faf8817de Initial commit: Python email notification API
- Flask-based email API for manufacturing notifications
- SMTP integration with configurable settings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 13:15:05 -05:00

32 lines
795 B
Bash
Executable File

#!/bin/bash
# Start the Email API service
#
# Required environment variables:
# SMTP_HOST - SMTP server hostname
# SMTP_USER - SMTP username
# SMTP_PASS - SMTP password
#
# Optional:
# SMTP_PORT - SMTP port (default: 587)
# SMTP_FROM - Default from address
# API_KEY - API key for authentication
# DB_HOST - MySQL host (default: 192.168.122.1)
# DB_USER - MySQL user (default: 570005354)
# DB_PASS - MySQL password
cd "$(dirname "$0")"
# Check for virtual environment
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
else
source venv/bin/activate
fi
# Start the API
echo "Starting Email API on port 5000..."
python app.py