ecs-deplojo icon indicating copy to clipboard operation
ecs-deplojo copied to clipboard

Minimize configuration by placing task definitions in the same configuration

Open robmoorman opened this issue 8 years ago • 1 comments

As #6 purposed, it can be an option to complete get rid of the separate task definitions files. Having all configuration in one place and in YAML is maybe a better option for better maintainability.

---
clusters:
  test:
    test-example
  production:
    production-example

environments:
    test:
      DATABASE_URL: postgresql://
    production:
      DATABASE_URL: postgresql://

task_definitions:
  web: 
    containerDefinitions:
      - name: uwsgi
        command: /usr/local/bin/uwsgi --ini /etc/uwsgi.ini
        memory: 256
        portMappings:
          - containerPort: 8080
            hostport: 0
            protocol: tcp
        logConfiguration:
          logDriver: awslogs
          options:
            awslogs-region: eu-west-1
    overrides:
      test:
        logConfiguration:
          options:
            awslogs-group: test-uwsgi
      production:
        logConfiguration:
          options:
            awslogs-group: production-uwsgi
        memory: 512

services:
  web: 
    task_definition: web

robmoorman avatar Mar 21 '17 12:03 robmoorman

This makes it indeed a lot simpler, although you will need #6 for this otherwise there is a lot of code-duplication between various envs

mvantellingen avatar Apr 14 '17 14:04 mvantellingen