app:
  image: amara-app
  command: app
  environment:
    DJANGO_SETTINGS_MODULE: dev_settings
    DJANGO_LIVE_TEST_SERVER_ADDRESS: 'localhost:8081,8090-8100,9000-9200'
    LANG: en_US.UTF-8
    WORKERS: 2
    JSON_LOGGING:
    DB_LOGGING:
  volumes:
    - .:/opt/apps/amara:Z
  hostname: unisubs.example.com
  ports:
    - "8000:8000"
  links:
    - db
    - queue
    - cache

worker:
  image: amara-app
  command: worker
  environment:
    CELERY_OPTS: -B
    CELERY_QUEUES: celery,feeds
    DJANGO_SETTINGS_MODULE: dev_settings
    LANG: en_US.UTF-8
    JSON_LOGGING:
  volumes:
    - .:/opt/apps/amara:Z
  links:
    - db
    - queue
    - cache

db:
  image: mysql
  environment:
    MYSQL_ROOT_PASSWORD: amara
    MYSQL_USER: amara
    MYSQL_PASSWORD: amara
    MYSQL_DATABASE: amara
  volumes:
    - ./docker-dev/mysql/conf.d/:/etc/mysql/conf.d:Z
  ports:
    - "3306"

queue:
  image: rabbitmq
  ports:
    - "5672"
    - "15672"

cache:
  image: memcached
  ports:
    - "11211"

app:
  image: amara-app
  command: app
  environment:
    DJANGO_SETTINGS_MODULE: dev_settings
    DJANGO_LIVE_TEST_SERVER_ADDRESS: 'localhost:8081,8090-8100,9000-9200'
    LANG: en_US.UTF-8
    WORKERS: 2
    JSON_LOGGING:
    DB_LOGGING:
  volumes:
    - .:/opt/apps/amara:z
  hostname: unisubs.example.com
  ports:
    - "8000:8000"
  links:
    - db
    - queue
    - cache

worker:
  image: amara-app
  command: worker
  environment:
    CELERY_OPTS: -B
    CELERY_QUEUES: celery,feeds
    DJANGO_SETTINGS_MODULE: dev_settings
    LANG: en_US.UTF-8
    JSON_LOGGING:
  volumes:
    - .:/opt/apps/amara:z
  links:
    - db
    - queue
    - cache

db:
  image: mysql
  environment:
    MYSQL_ROOT_PASSWORD: amara
    MYSQL_USER: amara
    MYSQL_PASSWORD: amara
    MYSQL_DATABASE: amara
  volumes:
    - ./docker-dev/mysql/conf.d/:/etc/mysql/conf.d:z
  ports:
    - "3306"

queue:
  image: rabbitmq
  ports:
    - "5672"
    - "15672"

cache:
  image: memcached
  ports:
    - "11211"

Use the "z" flag instead of "Z" for docker volumes
Use the "z" flag instead of "Z" for docker volumes

This allows the volumes to be shared, which we need because both the
worker and app container use the unisubs one.
