#!/bin/bash set -e APP_DIR="/home/frappe/frappe-bench/apps/didi_custom" VENV_PYTHON="/home/frappe/frappe-bench/env/bin/python" if [ -d "$APP_DIR" ]; then if ! "$VENV_PYTHON" -c "import didi_custom" >/dev/null 2>&1; then echo "[bootstrap] Installing didi_custom..." /home/frappe/frappe-bench/env/bin/pip install -e "$APP_DIR" fi fi # Start nginx in background for reverse proxy nginx # Change to frappe-bench directory (required for site resolution) cd /home/frappe/frappe-bench # Start gunicorn (default frappe entrypoint) exec /home/frappe/frappe-bench/env/bin/gunicorn \ --bind 0.0.0.0:8000 \ --workers 2 \ --threads 4 \ --worker-class gthread \ --worker-tmp-dir /dev/shm \ --timeout 120 \ --preload \ --chdir /home/frappe/frappe-bench/sites \ frappe.app:application