-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrender.yaml
More file actions
55 lines (49 loc) · 1.74 KB
/
render.yaml
File metadata and controls
55 lines (49 loc) · 1.74 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
services:
- type: web
name: visionforge
env: python
region: oregon
plan: free
branch: deploy
buildCommand: |
# Setup Oracle Wallet (REQUIRED - fail if missing)
if [ ! -f /etc/secrets/oracle_wallet.zip ]; then
echo "ERROR: Oracle Wallet not found at /etc/secrets/oracle_wallet.zip"
echo "Please add the wallet file in Render Secret Files section"
exit 1
fi
echo "Setting up Oracle Wallet..."
mkdir -p /opt/oracle/wallet
unzip -o /etc/secrets/oracle_wallet.zip -d /opt/oracle/wallet
chmod 600 /opt/oracle/wallet/*
echo "Oracle Wallet configured at /opt/oracle/wallet"
# Verify wallet files exist
if [ ! -f /opt/oracle/wallet/tnsnames.ora ]; then
echo "ERROR: Wallet extraction failed - tnsnames.ora not found"
exit 1
fi
# Install Python dependencies
cd project
pip install -r requirements.txt
# Test Oracle Database Connection (REQUIRED - fail if connection fails)
echo "Testing Oracle Database connection..."
python manage.py check --database default || {
echo "ERROR: Oracle Database connection failed"
echo "Please verify:"
echo " - ORACLE_USER is correct"
echo " - ORACLE_PASSWORD is correct"
echo " - ORACLE_DSN matches tnsnames.ora"
echo " - ORACLE_WALLET_PASSWORD is correct"
exit 1
}
echo "Oracle Database connection successful!"
# Build frontend
cd ..
chmod +x build_frontend.sh
./build_frontend.sh
# Collect Django static files
cd project
python manage.py collectstatic --noinput
startCommand: |
cd project
gunicorn --workers 2 --bind 0.0.0.0:$PORT backend.wsgi:application