Skip to content

Instantly share code, notes, and snippets.

@alexphelps
Last active September 1, 2017 13:12
Show Gist options
  • Save alexphelps/a4ced54ab8d5ecb589fa794571f626b3 to your computer and use it in GitHub Desktop.
Save alexphelps/a4ced54ab8d5ecb589fa794571f626b3 to your computer and use it in GitHub Desktop.
ECS Compose
---
version: '2'
services:
nginx:
image: "#####.dkr.ecr.us-east-1.amazonaws.com/nginx:latest"
cpu_shares: 50
mem_limit: 104857600
logging:
driver: awslogs
options:
awslogs-region: us-east-1
awslogs-group: awslogs-containers-staging
volumes:
- django_app_files:/code/
links:
- "web"
ports:
- "80"
web:
image: "####.dkr.ecr.us-east-1.amazonaws.com/app:latest"
cpu_shares: 100
mem_limit: 134217728
env_file:
- ./config/staging-web-variables.env
entrypoint: ["sh", "-c"]
working_dir: /code
command: [ "chmod u+x startup.sh && ./startup.sh"]
logging:
driver: awslogs
options:
awslogs-region: us-east-1
awslogs-group: awslogs-containers-staging
volumes:
- django_app_files:/code/
ports:
- "8000"
celery_worker:
image: "842253041479.dkr.ecr.us-east-1.amazonaws.com/app:latest"
cpu_shares: 100
mem_limit: 262144000
env_file:
- ./config/staging-web-variables.env
entrypoint: ["sh", "-c"]
working_dir: /code/calltracker
command: [ "celery -A calltracker worker -Q celery --autoscale=10,3 --without-gossip --without-mingle --without-heartbeat"]
logging:
driver: awslogs
options:
awslogs-region: us-east-1
awslogs-group: awslogs-containers-staging
volumes:
django_app_files:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment