-
Notifications
You must be signed in to change notification settings - Fork 0
/
production.json
64 lines (64 loc) · 2.08 KB
/
production.json
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
{
"resources": {
"carpanta_cluster": {
"type": "Aws::ECS::Cluster",
"properties": {
"cluster_name": "carpanta_cluster"
}
},
"carpanta_task": {
"type": "Aws::ECS::TaskDefinition",
"properties": {
"family": "carpanta",
"execution_role_arn": "<%= ENV.fetch('EXECUTION_ROLE_ARN') %>",
"container_definitions": [
{
"name": "app",
"image": "<%= ENV.fetch('IMAGE_NAME') %>:<%= ENV.fetch('IMAGE_TAG') %>",
"port_mappings": [
{
"container_port": 80,
"protocol": "tcp"
}
],
"environment": [
{ "name": "RACK_ENV", "value": "<%= ENV.fetch('RACK_ENV') %>" },
{ "name": "PORT", "value": "<%= ENV.fetch('PORT') %>" },
{ "name": "DB_ADAPTER", "value": "<%= ENV.fetch('DB_ADAPTER') %>" },
{ "name": "DB_DATABASE", "value": "<%= ENV.fetch('DB_DATABASE') %>" },
{ "name": "DB_POOL", "value": "<%= ENV.fetch('DB_POOL') %>" },
{ "name": "DB_TIMEOUT", "value": "<%= ENV.fetch('DB_TIMEOUT') %>" }
],
"log_configuration": {
"log_driver": "awslogs",
"options": {
"awslogs-create-group": "true",
"awslogs-group": "/ecs/carpanta-app",
"awslogs-region": "us-east-2",
"awslogs-stream-prefix": "carpanta"
}
}
}
],
"cpu": "256",
"memory": "512"
}
},
"carpanta_service": {
"type": "Aws::ECS::Service",
"properties": {
"cluster": { "ref": "carpanta_cluster" },
"service_name": "carpanta",
"task_definition": { "ref": "carpanta_task" },
"desired_count": 1,
"network_configuration": {
"awsvpc_configuration": {
"subnets": ["<%= ENV.fetch('SUBNETS') %>"],
"security_groups": ["<%= ENV.fetch('SECURITY_GROUPS') %>"],
"assign_public_ip": "ENABLED"
}
}
}
}
}
}