File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 2
2
# Author: Mihai Criveti
3
3
# Description: Run Gunicorn production server (optionally with TLS)
4
4
5
+ # Determine script directory
6
+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
7
+
8
+ # Attempt to activate a venv if not already active
9
+ if [[ -z " $VIRTUAL_ENV " ]]; then
10
+ # If a known venv path exists (like your custom .venv location), activate it
11
+ if [[ -f " ${HOME} /.venv/mcpgateway/bin/activate" ]]; then
12
+ echo " 🔧 Activating virtual environment: ${HOME} /.venv/mcpgateway"
13
+ source " ${HOME} /.venv/mcpgateway/bin/activate"
14
+ elif [[ -f " ${SCRIPT_DIR} /.venv/bin/activate" ]]; then
15
+ echo " 🔧 Activating virtual environment in script directory"
16
+ source " ${SCRIPT_DIR} /.venv/bin/activate"
17
+ else
18
+ echo " ⚠️ No virtual environment found! Please activate manually."
19
+ exit 1
20
+ fi
21
+ fi
22
+
5
23
cat << "EOF "
6
24
███╗ ███╗ ██████╗██████╗ ██████╗ █████╗ ████████╗███████╗██╗ ██╗ █████╗ ██╗ ██╗
7
25
████╗ ████║██╔════╝██╔══██╗ ██╔════╝ ██╔══██╗╚══██╔══╝██╔════╝██║ ██║██╔══██╗╚██╗ ██╔╝
You can’t perform that action at this time.
0 commit comments