updating for task def.
This commit is contained in:
@@ -19,6 +19,7 @@ phases:
|
|||||||
build:
|
build:
|
||||||
commands:
|
commands:
|
||||||
- ./lein build
|
- ./lein build
|
||||||
|
- cp taskdef.json target/
|
||||||
- echo Build started on `date`
|
- echo Build started on `date`
|
||||||
- echo Building the Docker image...
|
- echo Building the Docker image...
|
||||||
- docker build -t $REPOSITORY_URI:latest .
|
- docker build -t $REPOSITORY_URI:latest .
|
||||||
@@ -34,11 +35,13 @@ phases:
|
|||||||
artifacts:
|
artifacts:
|
||||||
files:
|
files:
|
||||||
- auto-ap.jar
|
- auto-ap.jar
|
||||||
|
- taskdef.json
|
||||||
base-directory: target
|
base-directory: target
|
||||||
secondary-artifacts:
|
secondary-artifacts:
|
||||||
jar:
|
jar:
|
||||||
files:
|
files:
|
||||||
- auto-ap.jar
|
- auto-ap.jar
|
||||||
|
- taskdef.json
|
||||||
base-directory: target
|
base-directory: target
|
||||||
web:
|
web:
|
||||||
files:
|
files:
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
[ring.middleware.gzip :refer [wrap-gzip]]
|
[ring.middleware.gzip :refer [wrap-gzip]]
|
||||||
[ring.util.response :as response]))
|
[ring.util.response :as response]))
|
||||||
|
|
||||||
(defcredential (:aws-access-key-id env) (:aws-secret-access-key env) (:aws-region env))
|
(when (:aws-access-key-id env)
|
||||||
|
(defcredential (:aws-access-key-id env) (:aws-secret-access-key env) (:aws-region env)))
|
||||||
|
|
||||||
(defroutes static-routes
|
(defroutes static-routes
|
||||||
(GET "/" [] (response/resource-response "index.html" {:root "public"}))
|
(GET "/" [] (response/resource-response "index.html" {:root "public"}))
|
||||||
|
|||||||
84
taskdef.json
Normal file
84
taskdef.json
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
{
|
||||||
|
"taskDefinition": {
|
||||||
|
"taskDefinitionArn": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat-app:4",
|
||||||
|
"containerDefinitions": [
|
||||||
|
{
|
||||||
|
"name": "integreat-app",
|
||||||
|
"image": "679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat",
|
||||||
|
"cpu": 0,
|
||||||
|
"portMappings": [
|
||||||
|
{
|
||||||
|
"containerPort": 3000,
|
||||||
|
"hostPort": 3000,
|
||||||
|
"protocol": "tcp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"containerPort": 9000,
|
||||||
|
"hostPort": 9000,
|
||||||
|
"protocol": "tcp"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"essential": true,
|
||||||
|
"environment": [
|
||||||
|
{
|
||||||
|
"name": "config",
|
||||||
|
"value": "/usr/local/config/staging.edn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"mountPoints": [],
|
||||||
|
"volumesFrom": [],
|
||||||
|
"logConfiguration": {
|
||||||
|
"logDriver": "awslogs",
|
||||||
|
"options": {
|
||||||
|
"awslogs-group": "/ecs/integreat-app",
|
||||||
|
"awslogs-region": "us-east-1",
|
||||||
|
"awslogs-stream-prefix": "ecs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"family": "integreat-app",
|
||||||
|
"taskRoleArn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
|
"executionRoleArn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole",
|
||||||
|
"networkMode": "awsvpc",
|
||||||
|
"revision": 4,
|
||||||
|
"volumes": [],
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"requiresAttributes": [
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.execution-role-awslogs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.execution-role-ecr-pull"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.task-eni"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"placementConstraints": [],
|
||||||
|
"compatibilities": [
|
||||||
|
"EC2",
|
||||||
|
"FARGATE"
|
||||||
|
],
|
||||||
|
"requiresCompatibilities": [
|
||||||
|
"FARGATE"
|
||||||
|
],
|
||||||
|
"cpu": "2048",
|
||||||
|
"memory": "4096"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user