-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy paths.yaml
68 lines (67 loc) · 2.03 KB
/
s.yaml
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
59
60
61
62
63
64
65
66
67
68
# ------------------------------------
# 官方手册: https://manual.serverless-devs.com/user-guide/aliyun/#fc3
# 有问题快来钉钉群问一下吧:33947367
# ------------------------------------
edition: 3.0.0
name: start-next-app
access: "default"
vars:
region: "ap-northeast-1"
functionName: "registry-website"
resources:
start_next:
component: fc3
actions:
pre-deploy:
- run: export PATH=/usr/local/versions/node/v20.8.1/bin:$PATH && npm install
path: ./
- run: export PATH=/usr/local/versions/node/v20.8.1/bin:$PATH && npm run build
path: ./
# - run: cp -r public .next/standalone/public
# path: ./code
# - run: cp -r static standalone/.next/static
# path: ./code/.next
props:
region: ${vars.region}
description: Serverless Devs Web Framework Function
runtime: custom.debian10
timeout: 60
cpu: 1
memorySize: 2048
diskSize: 512
instanceConcurrency: 200
logConfig: auto
layers:
- acs:fc:${vars.region}:official:layers/Nodejs20/versions/1
# - acs:fc:${vars.region}:1154600634854327:layers/registry-website-next-dependences/versions/2
environmentVariables:
PATH: >-
/opt/nodejs20/bin:/usr/local/bin/apache-maven/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ruby/bin
customRuntimeConfig:
command:
- npm
- run
- start
port: 3000
functionName: ${vars.functionName}
code: ./
triggers:
- triggerName: httpTrigger
triggerType: http
triggerConfig:
methods:
- GET
- POST
- PUT
- DELETE
authType: anonymous
# fc3_domain_0:
# component: fc3-domain
# props:
# region: ${vars.region}
# domainName: auto
# protocol: HTTP
# routeConfig:
# routes:
# - path: /*
# functionName: ${vars.functionName}