Home Assistant in a docker issues

Hello

I’ve been running HA in a docker for sometime and when my server is rebooted, I have several issues where as certain things don’t install untill I restart the HA docker.
duckdns/nest/xiaomi/darksky are all things that don’t start until I restart the HA container.

Any idea please? Maybe I need to somehow delay the container starting?

version: '2'
services:

  mqtt:
    container_name: mqtt
    restart: always
    image: toke/mosquitto
    volumes:
      - /sharedfolders/home/Mark/mqtt/config:/mqtt/config
      - /sharedfolders/home/Mark/mqtt/log:/mqtt/log
      - /sharedfolders/home/Mark/mqtt/data:/mqtt/data
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "1883:1883"
      - "9001:9001"

  ha-dockermon:
    container_name: ha-dockermon
    restart: always
    image: philhawthorne/ha-dockermon
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /export/home/Mark/HA-Dockermon:/config
    ports:
      - "8126:8126"


  monitoring:
    container_name: Glances
    image: nicolargo/glances:latest-alpine
    restart: always
    pid: host
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - "GLANCES_OPT=-w"
    network_mode: host
    privileged: true
  


  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: ''
      MYSQL_USER: ''
      MYSQL_PASSWORD: ''
      MYSQL_DATABASE1: ''
      MYSQL_USER1: ''
      MYSQL_PASSWORD1: ''
      MYSQL_ROOT_PASSWORD: ''
    ports:
      # <Port exposed> : < MySQL Port running inside container>
      - '3306:3306'
    expose:
      # Opens port 3306 on the container
      - '3306'
      # Where our data will be persisted
    volumes:
      - /sharedfolders/home/Mark/mysql:/var/lib/mysql
      - /etc/localtime:/etc/localtime:ro

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    links:
     - db:db
    ports:
      - 9191:80
    volumes:
      - /sharedfolders/home/Mark/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
    environment:
      MYSQL_USERNAME: 
      MYSQL_ROOT_PASSWORD: 
      MYSQL_DATABASE: ''


  homeassistant:
    container_name: home-assistant
    restart: always
    image: homeassistant/home-assistant
    depends_on:
      - "db"
      - "mqtt"
      - "monitoring"
      - "ha-dockermon"
    devices:
      - /dev/zwave:/dev/zwave
    volumes:
      - /sharedfolders/home/Mark/HomeAssistant:/config
      - /etc/localtime:/etc/localtime:ro
      - /dev/bus/usb:/dev/bus/usb
      - /var/run/dbus:/var/run/dbus 
    network_mode: host
    privileged: true


Cheers
Mark

these are the errors I get

2019-07-23 11:57:07 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=120 from 2019-07-23 07:32:41)
2019-07-23 11:57:08 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for bwalarm which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-07-23 11:57:09 ERROR (MainThread) [homeassistant.setup] Error during setup of component duckdns
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 955, in _create_direct_connection
    traces=traces), loop=self._loop)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 825, in _resolve_host
    self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/resolver.py", line 30, in resolve
    host, port, type=socket.SOCK_STREAM, family=family)
  File "uvloop/loop.pyx", line 1464, in getaddrinfo
socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/setup.py", line 153, in _async_setup_component
    hass, processed_config)
  File "/usr/src/app/homeassistant/components/duckdns/__init__.py", line 42, in async_setup
    result = await _update_duckdns(session, domain, token)
  File "/usr/src/app/homeassistant/components/duckdns/__init__.py", line 86, in _update_duckdns
    resp = await session.get(UPDATE_URL, params=params)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 476, in _request
    timeout=real_timeout
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 522, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 854, in _create_connection
    req, traces, timeout)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 959, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host www.duckdns.org:443 ssl:None [Temporary failure in name resolution]
2019-07-23 11:57:09 ERROR (SyncWorker_17) [homeassistant.components.darksky.weather] Unable to connect to Dark Sky. HTTPSConnectionPool(host='api.darksky.net', port=443): Max retries exceeded with url: /forecast/fe566eb46ded038e70d310d97b9c20db/54.529217,-1.209731?units=ca&lang=en (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5d9d43ce80>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
2019-07-23 11:57:09 ERROR (MainThread) [homeassistant.components.weather] darksky: Error on device update!
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/app/homeassistant/helpers/entity.py", line 377, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/darksky/weather.py", line 200, in update
    self._ds_currently = self._dark_sky.currently.d
AttributeError: 'NoneType' object has no attribute 'd'
2019-07-23 11:57:10 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for philips_ambilight which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-07-23 11:57:11 ERROR (MainThread) [homeassistant.components.rest.switch] Got non-ok response from resource: 404
2019-07-23 11:57:11 ERROR (MainThread) [homeassistant.components.rest.switch] Got non-ok response from resource: 404
2019-07-23 11:57:12 ERROR (SyncWorker_2) [homeassistant.components.darksky.sensor] Unable to connect to Dark Sky: HTTPSConnectionPool(host='api.darksky.net', port=443): Max retries exceeded with url: /forecast/fe566eb46ded038e70d310d97b9c20db/54.529234,-1.209649?units=si&lang=en (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5d54470780>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
2019-07-23 11:57:12 ERROR (MainThread) [homeassistant.components.sensor] uk_transport: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution