-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
67 lines (59 loc) · 1.81 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
66
67
service: bank-billet-gen
provider:
name: google
stage: dev
runtime: nodejs16
environment:
KOBANA_CLIENT_ID: ${env.KOBANA_CLIENT_ID}
KOBANA_CLIENT_SECRET: ${env.KOBANA_CLIENT_SECRET}
KOBANA_API_URL: ${env.KOBANA_API_URL}
KOBANA_AUTH_URL: ${env.KOBANA_AUTH_URL}
MAILGUN_API_KEY: ${env.MAILGUN_API_KEY}
MAILGUN_DOMAIN: ${env.MAILGUN_DOMAIN}
OTLP_EXPORTER_OTLP_TRACES_ENDPOINT: ${env.OTLP_EXPORTER_OTLP_TRACES_ENDPOINT}
region: 'us-east1'
project: bank-billet-generator
credentials: keyfile.json
frameworkVersion: '3'
plugins:
- serverless-google-cloudfunctions
- serverless-dotenv-plugin
package:
exclude:
- node_modules/**
- .gitignore
- .git/**
functions:
createBillet:
handler: createBillet
events:
- http: path
billetGenerator:
handler: billetGenerator
events:
- event:
eventType: providers/cloud.pubsub/eventTypes/topic.publish
resource: projects/bank-billet-generator/topics/billet-stream
emailSender:
handler: emailSender
events:
- event:
eventType: providers/cloud.pubsub/eventTypes/topic.publish
resource: projects/bank-billet-generator/topics/email-sender
# NOTE: the following uses an "event" event (pubSub event in this case).
# Please create the corresponding resources in the Google Cloud
# before deploying this service through Serverless
#second:
# handler: event
# events:
# - event:
# eventType: providers/cloud.pubsub/eventTypes/topic.publish
# resource: projects/*/topics/my-topic
# you can define resources, templates etc. the same way you would in a
# Google Cloud deployment configuration
#resources:
# resources:
# - type: storage.v1.bucket
# name: my-serverless-service-bucket
# imports:
# - path: my_template.jinja