Skip to content

Commit

Permalink
feat: Update render configuration to use Gunicorn for application ser…
Browse files Browse the repository at this point in the history
…ver and add logging path
  • Loading branch information
AhmedNassar7 committed Dec 13, 2024
1 parent 2f97a8a commit 689ef2d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ services:
buildCommand:
- apt-get update && apt-get install -y gcc libpq-dev python3-dev
- pip install --upgrade pip
- pip install gunicorn
- pip install -r requirements.txt
- python manage.py collectstatic --noinput
- python manage.py migrate --noinput
startCommand: "uvicorn egypt_metro.wsgi:application --host 0.0.0.0 --port 8000"
startCommand: "gunicorn egypt_metro.wsgi:application --bind 0.0.0.0:8000"
envVars:
- key: ENVIRONMENT # Environment for loading specific config
value: prod
Expand All @@ -27,6 +28,8 @@ services:
name: persistent-data
mountPath: /var/lib/egypt-metro
sizeGB: 1
logging:
- path: /var/log/egypt-metro.log
secretFiles:
- path: /etc/secrets/env.prod # Load sensitive secrets (e.g., SECRET_KEY, JWT_SECRET)
healthCheckPath: "/health" # Optional, ensure health endpoint exists

0 comments on commit 689ef2d

Please sign in to comment.