mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
vercel
This commit is contained in:
parent
97f3386822
commit
86824b24f0
3 changed files with 35 additions and 0 deletions
4
backend/server/build_files.sh
Normal file
4
backend/server/build_files.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
# build_files.sh
|
||||
|
||||
pip install -r requirements.txt
|
||||
python3.9 manage.py collectstatic --noinput
|
|
@ -122,6 +122,9 @@ MEDIA_URL = '/media/'
|
|||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||
# STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
|
||||
|
||||
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, "ui/staticfiles")
|
||||
|
||||
# TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
|
||||
|
||||
TEMPLATES = [
|
||||
|
|
28
backend/server/vercel.json
Normal file
28
backend/server/vercel.json
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"version": 2,
|
||||
"builds": [
|
||||
{
|
||||
"src": "demo/wsgi.py",
|
||||
"use": "@vercel/python",
|
||||
"config": { "maxLambdaSize": "15mb", "runtime": "python3.9" }
|
||||
},
|
||||
{
|
||||
"src": "build_files.sh",
|
||||
"use": "@vercel/static-build",
|
||||
"config": {
|
||||
"distDir": "ui/staticfiles"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"src": "/static/(.*)",
|
||||
"dest": "/static/$1"
|
||||
},
|
||||
{
|
||||
"src": "/(.*)",
|
||||
"dest": "demo/wsgi.py"
|
||||
}
|
||||
],
|
||||
"outputDirectory": "ui/staticfiles"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue