-
Notifications
You must be signed in to change notification settings - Fork 1
/
render.yaml
36 lines (35 loc) · 1.34 KB
/
render.yaml
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
# render.yaml
# Render configuration file for deploying a Django application to Render
# https://render.com/docs/deploy-django
services:
- type: web
name: django
runtime: python
dockerfilePath: ./Dockerfile
buildCommand: |
apt-get update && apt-get install -y gcc libpq-dev python3-dev && \
pip install --upgrade pip && \
pip install poetry && \
poetry install --no-dev && \
python manage.py collectstatic --noinput && \
python manage.py migrate --noinput
startCommand: gunicorn egypt_metro.wsgi:application --bind 0.0.0.0:$PORT --workers=3 --threads=2 --timeout=120
envVars:
- key: ENVIRONMENT # Environment for loading specific config
value: prod
- key: SECRET_KEY
value: ${SECRET_KEY}
- key: DATABASE_URL
value: ${DATABASE_URL}
- key: ALLOWED_HOSTS
value: backend-54v5.onrender.com
- key: DEBUG
value: "False"
- key: PYTHON_VERSION # Specify the Python version
value: "3.11.10"
disk: # Persistent storage (optional)
name: persistent-data
mountPath: /var/lib/egypt-metro
sizeGB: 1
healthCheckPath: "/health/" # Optional, ensure health endpoint exists
autoDeploy: true # Optional, auto-deploy when code is pushed to Git