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 20ece04
Showing 1 changed file with 15 additions and 26 deletions.
41 changes: 15 additions & 26 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
{
"builds": [
{
"src": "www/libx/package.json",
"use": "@vercel/static-build",
"config": {
"installCommand": "yarn install",
"buildCommand": "yarn build",
"outputDirectory": "www/libx/dist"
}
},
{
"src": "libx/app.py",
"use": "@vercel/python",
"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"
}
"functions": {
"api/libx/app.py": {
"runtime": "[email protected]",
"memory": 1024,
"maxDuration": 30
}
],
"routes": [
},
"buildCommand": "pip install pipenv && pipenv install --deploy && yarn --cwd www/libx install && yarn --cwd www/libx build",
"outputDirectory": "www/libx/dist",
"rewrites": [
{
"src": "/api/(.*)",
"dest": "/libx/app.py"
"source": "/api/(.*)",
"destination": "/api/libx/app.py"
},
{
"src": "/static/(.*)",
"dest": "/www/libx/dist/$1"
"source": "/static/(.*)",
"destination": "/www/libx/dist/$1"
},
{
"src": "/(.*)",
"dest": "/libx/app.py"
"source": "/(.*)",
"destination": "/api/libx/app.py"
}
]
}

0 comments on commit 20ece04

Please sign in to comment.