-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathserverless.yml
More file actions
108 lines (101 loc) · 3.17 KB
/
Copy pathserverless.yml
File metadata and controls
108 lines (101 loc) · 3.17 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
service: externals
bref:
team: bref
provider:
name: aws
region: eu-west-1
stage: prod
environment:
APP_ENV: ${param:appEnv}
APP_DEBUG: 'false'
APP_KEY: ${ssm:/externals/${sls:stage}/app_key}
APP_VERSION: ${env:GITHUB_RUN_ID}
APP_URL: ${construct:website.url}
DB_CONNECTION: mysql
DB_DATABASE: ${param:dbDatabase}
DB_HOST: ${ssm:/externals/db/host}
DB_PORT: 3306
DB_USERNAME: ${ssm:/externals/db/user}
DB_PASSWORD: ${ssm:/externals/db/password}
SESSION_DRIVER: cookie
SESSION_ENCRYPT: 'true'
CACHE_STORE: array
QUEUE_CONNECTION: sync
ALGOLIA_APP_ID: KSTITII7EC
ALGOLIA_API_KEY: ${ssm:/externals/algolia_api_key}
ALGOLIA_INDEX_PREFIX: ${param:algoliaIndexPrefix}
GITHUB_CLIENT_ID: ${param:githubOAuthClientId}
GITHUB_CLIENT_SECRET: ${ssm:/externals/github_oauth_client_secret}
GITHUB_REDIRECT_URI: '${construct:website.url}/login'
SENTRY_LARAVEL_DSN: ${ssm:/externals/sentry_url}
SENTRY_SAMPLE_RATE: 0
GOOGLE_NO_INDEX: ${param:noIndex}
params:
prod:
isProd: true
appEnv: production
dbDatabase: 'externals-prod'
domain: externals.io
algoliaIndexPrefix: v2_
githubOAuthClientId: b75b3226c86d801a95cd
noIndex: 0
reservedConcurrency: 30
default:
isProd: false
appEnv: staging
dbDatabase: 'externals-staging'
domain: staging.externals.io
algoliaIndexPrefix: dev_
githubOAuthClientId: 422ae3a54f6ebd43895b
noIndex: 1
reservedConcurrency: 3
package:
patterns:
- '!.github/**'
- 'backups/**'
- '!database/*.sqlite'
- '!node_modules/**'
- '!public/storage'
- '!resources/css/**'
- '!resources/js/**'
- '!storage/**'
- '!tests/**'
# Exclude assets except for the manifest file
- '!public/build/**'
- 'public/build/manifest.json'
functions:
web:
handler: Bref\LaravelBridge\Http\OctaneHandler
runtime: php-85
timeout: 10
reservedConcurrency: ${param:reservedConcurrency}
environment:
BREF_LOOP_MAX: 250
OCTANE_PERSIST_DATABASE_SESSIONS: 1
events:
- httpApi: '*'
artisan:
handler: artisan
runtime: php-85-console
timeout: 900
events:
# Synchronize new emails from PHP's NNTP server every 15 minutes.
- schedule:
rate: rate(15 minutes)
input:
cli: 'externals:sync'
# Only enabled in production
enabled: ${param:isProd}
plugins:
- ./vendor/bref/bref
- serverless-lift
constructs:
website:
type: server-side-website
assets:
'/assets/*': public/assets
'/build/*': public/build
'/favicon.ico': public/favicon.ico
'/robots.txt': public/robots.txt
domain: ${param:domain}
certificate: arn:aws:acm:us-east-1:416566615250:certificate/0f28e63d-d3a9-4578-9f8b-14347bfe8326