Skip to content

Commit

Permalink
Merge pull request #630 from YoungHypo/issue-node20_netlify
Browse files Browse the repository at this point in the history
upgrade dashboard to node20.15, replace netlify-lambda (deprecated) with netlify-cli
  • Loading branch information
YoungHypo authored Sep 5, 2024
2 parents 752322e + 16ef055 commit a9523b7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,8 @@ src/dashboard/lambda/mock/index.js

# Cello local storage
/**/opt/*
/**/cello/*
/**/cello/*

# Local Netlify folder
.netlify
deno.lock
2 changes: 2 additions & 0 deletions build_image/docker/common/dashboard/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ http {

#gzip on;

client_max_body_size 100M;

server {
listen 8081;
server_name localhost;
Expand Down
2 changes: 2 additions & 0 deletions src/api-engine/api_engine/settings.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,5 @@ SIMPLE_JWT = {
'TOKEN_TYPE_CLAIM': 'token_type',
'TOKEN_USER_CLASS': 'rest_framework_simplejwt.models.TokenUser',
}

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
8 changes: 8 additions & 0 deletions src/dashboard/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build]
functions = "lambda"

[[redirects]]
from = "/*"
to = "/.netlify/functions/:splat"
status = 200

10 changes: 6 additions & 4 deletions src/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"docker:dev": "docker compose -f ./docker/docker-compose.dev.yml up",
"docker:push": "npm run docker-hub:build && npm run docker:tag && docker push antdesign/ant-design-pro",
"docker:tag": "docker tag ant-design-pro antdesign/ant-design-pro",
"functions:build": "npm run generateMock && netlify-lambda build ./lambda",
"functions:run": "npm run generateMock && cross-env NODE_ENV=dev netlify-lambda serve ./lambda",
"functions:build": "yarn run generateMock && netlify dev",
"netlify:dev": "netlify dev",
"generateMock": "node ./scripts/generateMock",
"lint": "eslint --ext .js src mock tests && npm run lint:style && npm run lint:prettier",
"lint-staged": "lint-staged",
Expand All @@ -23,7 +23,7 @@
"lint:prettier": "check-prettier lint",
"lint:style": "stylelint 'src/**/*.less' --syntax less",
"prettier": "node ./scripts/prettier.js",
"site": "umi build && npm run functions:build",
"site": "umi build && yarn run functions:build",
"start": "cross-env umi dev PORT=8001",
"start:no-mock": "cross-env MOCK=none umi dev PORT=8002",
"test": "umi test",
Expand Down Expand Up @@ -57,6 +57,7 @@
"antd": "^4.2.5",
"bizcharts": "3.5.2-beta.1",
"bizcharts-plugin-slider": "^2.1.1-beta.1",
"body-parser": "^1.19.0",
"cello-paginator": "^1.0.1",
"classnames": "^2.2.6",
"enquire-js": "^0.2.1",
Expand All @@ -66,7 +67,7 @@
"lodash-decorators": "^6.0.1",
"memoize-one": "^5.0.0",
"moment": "^2.24.0",
"netlify-lambda": "^1.4.3",
"merge-umi-mock-data": "^1.0.0",
"numeral": "^2.0.6",
"nzh": "^1.0.4",
"omit.js": "^1.0.0",
Expand Down Expand Up @@ -119,6 +120,7 @@
"less": "^3.9.0",
"lint-staged": "^11.0.0",
"mockjs": "^1.0.1-beta3",
"netlify-cli": "^16.0.0",
"prettier": "^1.17.0",
"serverless-http": "^2.0.1",
"slash2": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/dashboard/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.2'
services:
test-dashboard:
image: node:14.17
image: node:14.18
volumes:
- $ROOT_PATH/src/dashboard:/dashboard
working_dir: /dashboard
Expand Down

0 comments on commit a9523b7

Please sign in to comment.