-
Notifications
You must be signed in to change notification settings - Fork 3
/
vercel.txt
58 lines (48 loc) · 1.14 KB
/
vercel.txt
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
56
57
58
vercel.json
{
"version": 2,
"builds": [
{
"src": "GalsenifyDj/wsgi.py",
"use": "@vercel/python",
"config": { "maxLambdaSize": "15mb", "runtime": "python3.9" }
},
{
"src": "build_files.sh",
"use": "@vercel/static-build",
"config": {
"distDir": "staticfiles_build"
}
}
],
"routes": [
{
"src": "/static/(.*)",
"dest": "/static/$1"
},
{
"src": "/(.*)",
"dest": "GalsenifyDj/wsgi.py"
}
]
}
build_files.sh
pip install -r requirements.txt
python3.9 manage.py collectstatic
settings.py
ALLOWED_HOSTS = ['.vercel.app','now.sh','127.0.0.1','localhost']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'railway',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
STATICFILES_DIRS = os.path.join(BASE_DIR, 'static'),
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_build', 'static')
urls.py
urlpatterns += static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)