Skip to content

Commit

Permalink
use new vercel config
Browse files Browse the repository at this point in the history
  • Loading branch information
ra0x3 committed Dec 16, 2024
1 parent 902af83 commit 8ee7bc8
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
{
"version": 2,
"builds": [
{
"src": "www/libx/package.json",
"use": "@vercel/static-build",
"src": "api/libx/app.py",
"use": "@vercel/python",
"config": {
"installCommand": "yarn install",
"buildCommand": "yarn build",
"outputDirectory": "www/libx/dist"
"runtime": "python3.9",
"maxLambdaSize": "15mb",
"buildCommand": "pip install pipenv && pipenv install --deploy",
"startCommand": "ENV=production FLASK_APP=libx/app.py FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=5000 flask run"
}
},
{
"src": "libx/app.py",
"use": "@vercel/python",
"src": "www/libx/package.json",
"use": "@vercel/static-build",
"config": {
"runtime": "python3.12",
"installCommand": "pip install pipenv && pipenv install --deploy",
"startCommand": "ENV=production FLASK_APP=libx/app.py FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=5000 flask run"
"distDir": "dist",
"buildCommand": "yarn --cwd www/libx install && yarn --cwd www/libx build",
"outputDirectory": "www/libx/dist"
}
}
],
"routes": [
{
"src": "/api/(.*)",
"dest": "/libx/app.py"
"dest": "/api/libx/app.py"
},
{
"src": "/static/(.*)",
"dest": "/www/libx/dist/$1"
},
{
"handle": "filesystem"
},
{
"src": "/(.*)",
"dest": "/libx/app.py"
"dest": "/api/libx/app.py"
}
]
],
"env": {
"FLASK_APP": "libx/app.py",
"FLASK_ENV": "production"
}
}

0 comments on commit 8ee7bc8

Please sign in to comment.