db:
  image: postgres
  volumes:
    - ./create_hstore_extension.sh:/docker-entrypoint-initdb.d/create_hstore_extension.sh:ro

data:
  image: cogniteev/echo
  volumes:
    - /var/www/image_data

uwsgi:
  restart: always
  image: neurovault/neurovault
  command: /code/run_uwsgi.sh
  volumes_from:
    - data
  volumes:
    - .:/code
    - /var/www/static
  links:
    - db
    - redis

nginx:
  restart: always
  image: nginx
  ports:
    - "80:80"
  volumes:
    - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    - ./uwsgi_params.par:/etc/nginx/uwsgi_params.par:ro
  volumes_from:
    - uwsgi
    - data
  links:
    - uwsgi

redis:
  restart: always
  image: redis

worker:
  image: neurovault/neurovault
  command: celery worker -A neurovault.celery -Q default -n default@%h
  volumes:
    - .:/code
  volumes_from:
    - uwsgi
    - data
  links:
    - db
    - redis

version: '2'
services:
  db:
    image: postgres
    volumes:
      - ./create_hstore_extension.sh:/docker-entrypoint-initdb.d/create_hstore_extension.sh:ro

  data:
    image: cogniteev/echo
    volumes:
      - /var/www/image_data

  uwsgi:
    restart: always
    image: neurovault/neurovault
    command: /code/run_uwsgi.sh
    volumes_from:
      - data
    volumes:
      - .:/code
      - /var/www/static
    depends_on:
      - db
      - redis

  nginx:
    restart: always
    image: nginx
    ports:
      - "80:80"
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
      - ./uwsgi_params.par:/etc/nginx/uwsgi_params.par:ro
    volumes_from:
      - uwsgi
      - data
    depends_on:
      - uwsgi

  redis:
    restart: always
    image: redis

  worker:
    image: neurovault/neurovault
    command: celery worker -A neurovault.celery -Q default -n default@%h
    volumes:
      - .:/code
    volumes_from:
      - uwsgi
      - data
    depends_on:
      - db
      - redis

Update docker compose to version 2
Update docker compose to version 2
