-
Notifications
You must be signed in to change notification settings - Fork 1
/
s.yaml
65 lines (63 loc) · 2.08 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
edition: 1.0.0
name: start-strapi
access: "dankun"
vars:
region: "cn-shenzhen"
caPort: 1337
service:
name: "strapi"
description: 'Serverless Devs Web Framework Service'
# logConfig: auto
# nasConfig: auto
services:
strapi-production:
component: fc
# actions:
# pre-deploy:
# - run: |
# npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
# npm config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips"
# SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install --arch=x64 --platform=linux --libc=glibc
props:
region: ${vars.region}
service: ${vars.service}
function:
name: strapi-production
description: 'strapi 生产环境'
codeUri: './'
runtime: custom
instanceConcurrency: 10
timeout: 60
caPort: ${vars.caPort}
memorySize: 256
layers:
- acs:fc:${vars.region}:1740298130743624:layers/strapi/versions/1
- acs:fc:${vars.region}:official:layers/Nodejs16/versions/2
environmentVariables:
NODE_ENV: production
NODE_PATH: /opt/nodejs/node_modules
PATH: /opt/nodejs/node_modules/.bin:/opt/nodejs/node_modules:/opt:/opt/nodejs16/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
API_TOKEN_SALT: ${env.API_TOKEN_SALT}
DATABASE_FILENAME: ${env.DATABASE_FILENAME}
APP_KEYS: ${env.APP_KEYS}
JWT_SECRET: ${env.JWT_SECRET}
PORT: ${vars.caPort}
ADMIN_JWT_SECRET: ${env.ADMIN_JWT_SECRET}
HOST: 0.0.0.0
DATABASE_CLIENT: sqlite
TRANSFER_TOKEN_SALT: ${env.TRANSFER_TOKEN_SALT}
customRuntimeConfig:
command:
- node
- server.js
triggers:
- name: httpTrigger
type: http
config:
authType: anonymous
methods:
- GET
- POST
- PUT
- HEAD
- DELETE