mirror of
https://github.com/kodxana/madiator-docker-runpod.git
synced 2024-11-23 03:10:12 +01:00
18 lines
No EOL
484 B
Bash
18 lines
No EOL
484 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Set Flask environment variables
|
|
export FLASK_ENV=production
|
|
|
|
# Use APP_PATH environment variable if set, otherwise use a default
|
|
APP_PATH=${APP_PATH:-"/app/app.py"}
|
|
|
|
# Extract the directory and filename
|
|
APP_DIR=$(dirname "$APP_PATH")
|
|
APP_FILE=$(basename "$APP_PATH")
|
|
|
|
# Change to the app directory
|
|
cd "$APP_DIR"
|
|
|
|
# Start Gunicorn with your Flask app
|
|
exec gunicorn --bind 0.0.0.0:7223 --worker-class gevent --workers 1 "${APP_FILE%.*}:app" # Changed port to 7223 |