asosnovsky / Shortumation

[Not Maintained] A better way to write automations in home-assistant without having to install and run a seperate automation engine!
MIT License
300 stars 7 forks source link

Failing to create container #132

Closed eximo84 closed 2 years ago

eximo84 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

running docker-compose up -d i get:

ERROR: for shortumation Cannot create container for service shortumation: invalid IP address in add-host: "host-gateway"

Below is my compose file

Additional context Add any other context about the problem here.

version: "3.6"
services:
  homeassistant:
    image: homeassistant/home-assistant:latest
    container_name: homeassistant
    hostname: homeassistant
    network_mode: "host"
    restart: always
    healthcheck:
      test: ["CMD", "curl", "-f", "http://127.0.0.1:8123"]
      interval: 30s
      timeout: 10s
      retries: 6
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/letsencrypt:/letsencrypt:ro
      - /MYCONFIG:/config

  #https://github.com/asosnovsky/Shortumation 
  shortumation:
    image: "asosnovsky/shortumation-amd64:v0.5.2"
    container_name: shortumation
    ports:
      - 8124:8000
    extra_hosts:
      - "host.docker.internal:host-gateway"
    volumes:
      - /MYCONFIG:/config
    environment:
      - SUPERVISOR_TOKEN=TOKEN
      - HASSIO_WS=ws://HOSTIPFORHA:8123/api/websocket

I havent used extra_hosts before on any other container so not sure what is supposed to be there.

eximo84 commented 2 years ago

ah just saw on reddit you have to go to IP:PORT/web/ - so with these lines commented out it works ok


  - "host.docker.internal:host-gateway"
asosnovsky commented 2 years ago

yea, in the next release it will automatically redirect from / to /web. but this is a duplicate of https://github.com/asosnovsky/Shortumation/issues/125, so I will be closing this for now :)