-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamplify.yml
41 lines (41 loc) · 1.63 KB
/
amplify.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
version: 1
backend:
phases:
build:
commands:
- npm ci --cache .npm --prefer-offline
- npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID
frontend:
phases:
preBuild:
commands:
- npm cache clean --force
- nvm install 18.19.1
- nvm use 18.19.1
- mkdir -p src/environments
- |
echo "export const environment = { production: false, apiKey: '$API_KEY' };" > src/environments/environment.ts
- |
echo "export const environment = { production: true, apiKey: '$API_KEY' };" > src/environments/environment.prod.ts
build:
commands:
- npm install -g @angular/cli
- ng version
- ng build --configuration=production
artifacts:
baseDirectory: dist/smart-inventory/browser
files:
- '**/*'
customHeaders:
- pattern: '**/*'
headers:
- key: X-Frame-Options
value: SAMEORIGIN
- key: X-Content-Type-Options
value: nosniff
- key: Strict-Transport-Security
value: max-age=31536000; includeSubDomains
- key: Content-Security-Policy
value: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self' https://*.amazonaws.com https://*.amplifyapp.com; frame-ancestors 'self'; form-action 'self';"
- key: Cache-Control
value: no-store, max-age=0