Last active
June 9, 2018 00:44
-
-
Save spieden/7a5b303e6ce03bbbce765e797f236a73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:8u121-jdk-alpine | |
RUN apk update && apk add curl bash | |
ADD https://private/url/for/datomic-pro.zip /datomic-pro.zip | |
RUN mkdir /datomic && unzip /datomic-pro.zip -d /datomic | |
ADD go.sh /go.sh | |
RUN chmod 755 /go.sh | |
EXPOSE 4334 | |
CMD /go.sh | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -xe | |
cd /datomic/datomic-* | |
cat <<EOF > aws.properties | |
host=`curl -q http://169.254.169.254/latest/meta-data/local-ipv4` | |
aws-cloudwatch-region=${REGION} | |
aws-dynamodb-region=${REGION} | |
aws-transactor-role=${TRANSACTOR_ROLE} | |
aws-peer-role=${PEER_ROLE} | |
protocol=${PROTOCOL} | |
memory-index-max=${MEMORY_INDEX_MAX} | |
heartbeat-interval-msec=${HEARTBEAT_INTERVAL_MSEC} | |
port=4334 | |
memory-index-threshold=${MEMORY_INDEX_THRESHOLD} | |
aws-cloudwatch-dimension-value=${CLOUDWATCH_DIMENSION} | |
object-cache-max=${OBJECT_CACHE_MAX} | |
license-key=${LICENSE_KEY} | |
aws-dynamodb-table=${DDB_TABLE} | |
EOF | |
bin/transactor -Xms${XMX} -Xmx${XMX} aws.properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"taskDefinition": { | |
"status": "ACTIVE", | |
"networkMode": "host", | |
"family": "YOUR_FAMILY", | |
"placementConstraints": [], | |
"requiresAttributes": [ | |
{ | |
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.17" | |
}, | |
{ | |
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18" | |
}, | |
{ | |
"name": "com.amazonaws.ecs.capability.ecr-auth" | |
} | |
], | |
"compatibilities": [ | |
"EC2" | |
], | |
"volumes": [], | |
"requiresCompatibilities": [], | |
"taskDefinitionArn": "ARN_IN_YOUR_ACCOUNT", | |
"containerDefinitions": [ | |
{ | |
"dnsSearchDomains": [], | |
"environment": [ | |
{ | |
"name": "LICENSE_KEY", | |
"value": "YOUR_LICENSE_KEY_HERE" | |
}, | |
{ | |
"name": "DDB_TABLE", | |
"value": "YOUR_DDB_TABLE_HERE" | |
}, | |
{ | |
"name": "XMX", | |
"value": "2816M" | |
}, | |
{ | |
"name": "MEMORY_INDEX_MAX", | |
"value": "350m" | |
}, | |
{ | |
"name": "PEER_ROLE", | |
"value": "YOUR_PEER_ROLE" | |
}, | |
{ | |
"name": "TRANSACTOR_ROLE", | |
"value": "YOUR_TRANSACTOR_ROLE" | |
}, | |
{ | |
"name": "PROTOCOL", | |
"value": "ddb" | |
}, | |
{ | |
"name": "MEMORY_INDEX_THRESHOLD", | |
"value": "32m" | |
}, | |
{ | |
"name": "HEARTBEAT_INTERVAL_MSEC", | |
"value": "15000" | |
}, | |
{ | |
"name": "CLOUDWATCH_DIMENSION", | |
"value": "transactor-prod" | |
}, | |
{ | |
"name": "OBJECT_CACHE_MAX", | |
"value": "700m" | |
}, | |
{ | |
"name": "REGION", | |
"value": "us-west-2" | |
} | |
], | |
"name": "datomic-transactor", | |
"links": [], | |
"mountPoints": [], | |
"image": "YOUR_IMAGE_TAG", | |
"dockerLabels": {}, | |
"essential": true, | |
"portMappings": [], | |
"dnsServers": [], | |
"dockerSecurityOptions": [], | |
"entryPoint": [], | |
"ulimits": [], | |
"memory": 3954, | |
"command": [], | |
"extraHosts": [], | |
"cpu": 0, | |
"volumesFrom": [] | |
} | |
], | |
"revision": 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment