-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathhello-nofront.jsonnet
56 lines (55 loc) · 1.42 KB
/
hello-nofront.jsonnet
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
local fileProvider = std.native('provide.file');
local provide(name) = fileProvider(std.toString({ path: 'hello.env' }), name);
{
scheduler: {
type: 'ecs',
region: 'ap-northeast-1',
cluster: 'eagletmt',
desired_count: 2,
role: 'ecsServiceRole',
elb_v2: {
// VPC id where the target group is located
vpc_id: 'vpc-WWWWWWWW',
// Health check path of the target group
health_check_path: '/site/sha',
listeners: [
{
port: 80,
protocol: 'HTTP',
},
{
port: 443,
protocol: 'HTTPS',
certificate_arn: 'arn:aws:iam::012345678901:server-certificate/hello-lb-v2.example.com',
},
],
subnets: ['subnet-XXXXXXXX', 'subnet-YYYYYYYY'],
security_groups: ['sg-ZZZZZZZZ'],
load_balancer_attributes: {
'access_logs.s3.enabled': 'true',
'access_logs.s3.bucket': 'hako-access-logs',
'access_logs.s3.prefix': 'hako-hello-lb-v2',
},
// Connect ELB to app container
container_name: 'app',
container_port: 3000,
},
},
app: {
image: 'ryotarai/hello-sinatra',
memory: 128,
cpu: 256,
env: {
PORT: '3000',
MESSAGE: std.format('%s-san', provide('username')),
},
// Add port mapping to connect to ELB
port_mappings: [
{
container_port: 3000,
host_port: 0,
protocol: 'tcp',
},
],
},
}