-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathserverless.yml
66 lines (59 loc) · 1.51 KB
/
serverless.yml
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
service:
name: ${self:custom.NAME}
frameworkVersion: ">=1.27.0"
provider:
name: aws
runtime: nodejs12.x
region: ap-northeast-1
stage: ${self:custom.STAGE}
custom:
NAME: nuxt-on-lambda
STAGE: ${file(./configs/env.js):exporter.STAGE}
BASE_URL: ${file(./configs/env.js):exporter.BASE_URL}
ENDPOINT_ENV: ${file(./configs/env.js):exporter.ENDPOINT_ENV}
NODE_ENV: ${file(./configs/env.js):exporter.NODE_ENV}
# 少しでもデプロイのパッケージファイルを少なくする
package:
excludeDevDependencies: true
exclude:
- .**
- .**/*
- app/**
- LICENSE
- README.md
- package.json
- yarn.lock
# Node.js 上で使われないモジュール
# 重いものを優先的に除外
- node_modules/babel**/**
- node_modules/caniuse-db/**
- node_modules/prettier/**
- node_modules/yargs/**
- node_modules/xxhashjs/**
- node_modules/jschardet/**
- node_modules/**/*.md
- node_modules/**/bin/**
include:
- server/**
- configs/**
- nuxt.config.js
- .nuxt/**
- node_modules/autoprefixer/**
- node_modules/babel-runtime/**
- node_modules/babel-extract-comments/**
functions:
render:
handler: server/handler.render
timeout: 30
memorySize: 128
environment:
BASE_URL: ${self:custom.BASE_URL}
ENDPOINT_ENV: ${self:custom.ENDPOINT_ENV}
NODE_ENV: ${self:custom.NODE_ENV}
events:
- http:
path: '/'
method: get
- http:
path: '{proxy+}'
method: get