chore: update ecosystem config to use virtualenv gunicorn path and adjust setup script execution
This commit is contained in:
parent
ee5e08ee66
commit
fdf7928463
@ -2,9 +2,8 @@ module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: 'vsphere-backup-manager',
|
||||
// Gunicorn as the production WSGI server
|
||||
// If using a virtualenv, replace 'gunicorn' with './venv/bin/gunicorn'
|
||||
script: 'gunicorn',
|
||||
// Gunicorn inside the virtualenv as the production WSGI server
|
||||
script: './venv/bin/gunicorn',
|
||||
args: [
|
||||
'--workers', '4',
|
||||
'--bind', '127.0.0.1:5000',
|
||||
|
||||
16
setup.sh
16
setup.sh
@ -18,15 +18,17 @@ echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# ── 1. Install system packages ────────────────────────────────────────────────
|
||||
echo "[1/6] Installing Nginx..."
|
||||
echo "[1/6] Installing Nginx and Python Venv..."
|
||||
sudo -E apt update
|
||||
sudo -E apt install -y nginx
|
||||
sudo -E apt install -y nginx python3-venv
|
||||
|
||||
# ── 2. Install Python packages ────────────────────────────────────────────────
|
||||
echo "[2/6] Installing Python dependencies (including gunicorn)..."
|
||||
# If you use a virtualenv, activate it first:
|
||||
# source ./venv/bin/activate
|
||||
pip install -r "$APP_DIR/requirements.txt"
|
||||
# ── 2. Install Python packages in virtual environment ────────────────────────
|
||||
echo "[2/6] Setting up virtual environment and installing Python dependencies..."
|
||||
if [ ! -d "$APP_DIR/venv" ]; then
|
||||
python3 -m venv "$APP_DIR/venv"
|
||||
fi
|
||||
"$APP_DIR/venv/bin/pip" install --upgrade pip
|
||||
"$APP_DIR/venv/bin/pip" install -r "$APP_DIR/requirements.txt"
|
||||
|
||||
# ── 3. Generate self-signed SSL certificate (10-year validity) ────────────────
|
||||
echo "[3/6] Generating self-signed TLS certificate (10 years)..."
|
||||
|
||||
Loading…
Reference in New Issue
Block a user