From 689ef2dd05434e75399b587bec5a4284a05db02d Mon Sep 17 00:00:00 2001 From: Ahmed Nassar Date: Sat, 14 Dec 2024 01:52:12 +0200 Subject: [PATCH] feat: Update render configuration to use Gunicorn for application server and add logging path --- render.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/render.yaml b/render.yaml index c2f35ef..f622779 100644 --- a/render.yaml +++ b/render.yaml @@ -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 @@ -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