version: '3'

services:

  admin:
    build: .
    restart: always
    volumes:
      - .:/code
      - logvolume01:/var/log
    ports:
      - "9000:8000"
    command: python manage.py runserver 0.0.0.0:8000  # need to run external port

  crossbar:
    image: crossbario/crossbar-armhf  # use the arm version on raspberry pi
    container_name: crossbar
    ports:
      - "8090:8080"

  auvcontrol:
    build: .
    restart: always
    volumes:
      - .:/code
      - logvolume01:/var/log
    command: python manage.py runauv
    links:
      - crossbar
    depends_on:
      - crossbar

  rccontrol:
    image: auv-control-pi_admin
    restart: always
    volumes:
      - .:/code
      - logvolume01:/var/log
    command: python rc_controller.py
    links:
      - crossbar
    depends_on:
      - crossbar

volumes:
  logvolume01: {}

  # used to persist model data between container recreation
  data:
    driver: local

version: '3'

services:

  crossbar:
    image: crossbario/crossbar-armhf  # use the arm version on raspberry pi
    container_name: crossbar
    ports:
      - "8080:8080"

  admin:
    image: auv_control
    restart: always
    volumes:
      - .:/code
      - logvolume01:/var/log
    ports:
      - "8000:8000"
    command: python manage.py runserver 0.0.0.0:8000  # need to run external port

  auvcontrol:
    image: auv_control
    restart: always
    volumes:
      - .:/code
      - logvolume01:/var/log
    command: python manage.py runauv
    links:
      - crossbar
    depends_on:
      - crossbar

  rccontrol:
    image: auv_control
    restart: always
    volumes:
      - .:/code
      - logvolume01:/var/log
    command: python rc_controller.py
    links:
      - crossbar
    depends_on:
      - crossbar

volumes:
  logvolume01: {}

  # used to persist model data between container recreation
  data:
    driver: local

Use same image for all local containers
Use same image for all local containers
