-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_setup.sh
More file actions
executable file
·32 lines (28 loc) · 1.14 KB
/
verify_setup.sh
File metadata and controls
executable file
·32 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# Quick verification script
echo "=== Environment Check ==="
echo "CODESPACE_NAME: ${CODESPACE_NAME}"
echo ""
echo "=== Django Configuration ==="
# Get the directory where this script is located and derive the backend path
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${SCRIPT_DIR}/octofit-tracker/backend"
source venv/bin/activate
python3 << EOF
import os
os.environ.setdefault('CODESPACE_NAME', os.getenv('CODESPACE_NAME', 'not-set'))
from octofit_tracker import settings
print(f"ALLOWED_HOSTS: {settings.ALLOWED_HOSTS}")
print(f"DEBUG: {settings.DEBUG}")
if hasattr(settings, 'USE_X_FORWARDED_HOST'):
print(f"USE_X_FORWARDED_HOST: {settings.USE_X_FORWARDED_HOST}")
if hasattr(settings, 'SECURE_PROXY_SSL_HEADER'):
print(f"SECURE_PROXY_SSL_HEADER: {settings.SECURE_PROXY_SSL_HEADER}")
EOF
echo ""
echo "=== MongoDB Status ==="
ps aux | grep mongod | grep -v grep || echo "MongoDB not running"
echo ""
echo "=== Port Status ==="
echo "Port 8000: $(lsof -i :8000 >/dev/null 2>&1 && echo 'In use' || echo 'Available')"
echo "Port 27017: $(lsof -i :27017 >/dev/null 2>&1 && echo 'In use (MongoDB)' || echo 'Available')"