-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
81 lines (80 loc) · 1.85 KB
/
config.ts
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
import { AlbTargetGroupHealthCheck } from './.gen/providers/aws/elb';
import { RdsClusterConfig } from './.gen/providers/aws/rds';
export default {
appName: 'app-name',
region: 'us-east-1',
createVPC: false,
autoScaling: {
min: 1,
max: 5,
cpuTarget: 65,
scaleInCooldown: 30,
scaleOutCooldown: 30,
},
loadBalancer: {
port: 80,
healthCheck: {
path: '/alb-status',
interval: 30,
protocol: 'HTTP',
timeout: 5,
unhealthyThreshold: 2,
healthyThreshold: 3,
} as AlbTargetGroupHealthCheck,
},
container: {
port: 80,
cpu: 256,
memory: 512,
environment: [
{
name: 'FOO',
value: 'bar',
},
],
mountPoints: [
{
sourceVolume: 'efs-vol',
containerPath: '/var/www',
},
],
},
db: {
createDatabase: true,
config: {
masterUsername: process.env.DB_USERNAME,
masterPassword: process.env.DB_PASSWORD,
skipFinalSnapshot: true, // !!! Must be set to false in prod to avoid data loss !!!
databaseName: process.env.DB_NAME,
} as RdsClusterConfig,
},
backup: {
enabled: false,
secondaryRegion: 'us-west-1',
},
notifications: {
slack: {
webhookURL:
'https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX',
channel: '#app-name',
username: 'AWS',
icon_emoji: ':fire:',
},
events: {
CodePipeline: `{
"source": ["aws.codepipeline"],
"detail-type": ["CodePipeline Pipeline Execution State Change"],
"detail": {
"state": ["STARTED", "SUCCEEDED", "FAILED", "CANCELED"]
}
}`,
CodeDeploy: `{
"source": ["aws.codedeploy"],
"detail-type": ["CodeDeploy Deployment State-change Notification"],
"detail": {
"state": ["START", "STOP", "FAILURE", "SUCCESS"]
}
}`,
},
},
};