-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserverless.yml
82 lines (76 loc) · 2.91 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
service: our-wedding-website
frameworkVersion: ^3.12.0
custom:
tags:
Service: OurWedding
Application: Website
Env: ${self:provider.stage}
provider:
name: aws
region: ${opt:region}
stage: ${opt:stage}
runtime: provided.al2
memorySize: 512
vpc:
securityGroupIds:
- ${ssm:/our-wedding/${self:provider.stage}/network/default-security-group-id}
subnetIds: ${ssm:/our-wedding/${self:provider.stage}/network/private-subnet-ids}
tags: ${self:custom.tags}
stackTags: ${self:custom.tags}
deploymentBucket:
tags: ${self:custom.tags}
blockPublicAccess: true
iam:
role:
managedPolicies:
- ${ssm:/our-wedding/${self:provider.stage}/apps/website/policy-arn}
environment:
APP_ENV: prod
APP_SECRET: 'sm:/our-wedding/${self:provider.stage}/apps/website/app-secret'
PROXY_AUTH_KEY_HEADER: '${ssm:/our-wedding/${self:provider.stage}/apps/website/origin-domain-auth-key-header}'
PROXY_AUTH_KEY_VALUE: '${ssm:/aws/reference/secretsmanager//our-wedding/${self:provider.stage}/apps/website/origin-domain-auth-key}'
HOST: '${ssm:/our-wedding/${self:provider.stage}/apps/website/host}'
HTTPS: true
TRUSTED_PROXIES: '127.0.0.1'
MESSENGER_ASYNC_TRANSPORT_DSN: '${ssm:/our-wedding/${self:provider.stage}/apps/website/worker-queue-url}'
DYNAMODB_SESSIONS_TABLE: '${ssm:/our-wedding/${self:provider.stage}/apps/website/sessions-table-name}'
DATABASE_URL: 'sm:/our-wedding/${self:provider.stage}/data/website/db-url'
MAILER_DSN: 'sm:/our-wedding/${self:provider.stage}/apps/website/mailer-dsn'
EMAIL_NOTIFIER_TO: '${ssm(raw):/our-wedding/${self:provider.stage}/apps/website/email-notifier-to}'
EMAIL_NOTIFIER_FROM: '${ssm:/our-wedding/${self:provider.stage}/apps/website/email-notifier-from}'
ADMIN_PASSWORD: 'sm:/our-wedding/${self:provider.stage}/apps/website/admin-password'
PAGE_CONTENT: 'sm:/our-wedding/${self:provider.stage}/apps/website/page-content'
plugins:
- ./vendor/bref/bref
functions:
web:
handler: public/index.php
timeout: 60
url: true
layers:
- ${bref:layer.php-81-fpm}
worker:
handler: bin/worker.php
timeout: 120
layers:
- ${bref:layer.php-81}
events:
- sqs:
arn: '${ssm:/our-wedding/${self:provider.stage}/apps/website/worker-queue-arn}'
batchSize: 1
console:
handler: bin/console
timeout: 120
layers:
- ${bref:layer.php-81}
- ${bref:layer.console}
package:
patterns:
- '!src/Ui/Http/Asset/**'
- '!node_modules/**'
- '!public/build/**'
- '!tests/**'
- '!var/**'
- 'var/cache/prod/**'
- 'public/build/entrypoints.json'
- 'public/build/manifest.json'