bastilimbach / docker-MagicMirror

Docker image for the Magic Mirror 2 project by Michael Teeuw.
https://hub.docker.com/r/bastilimbach/docker-magicmirror/
MIT License
186 stars 54 forks source link

MagicMirror: v2.3.1 pls update zu v2.4 #12

Closed Jan-2005 closed 6 years ago

Jan-2005 commented 6 years ago

I have just installed Magic mirror per docker. The config is not recognized. I can not install any other modules.

Can you help me. have heard of the latest version should be fixed. Greeting Jan

bastilimbach commented 6 years ago

The image gets updated every day by a cron job from Travis CI. It should already be the latest MagicMirror version. What exactly is your problem? Could you post some logs/error messages?

Jan-2005 commented 6 years ago
Starting MagicMirror: v2.3.1
Loading config ...
WARNING! Could not find config file. Please create one. Starting with default configuration.
ading module helpers ...
Initializing new module helper ...
Module helper loaded: updatenotification
No helper found for module: helloworld.
l module helpers loaded.
Starting server on port 8080 ... 
Server started ...
Connecting socket for: updatenotification
Sockets connected & modules started ...
Ready to go! Please point your browser to: http://localhost:8080
Jan-2005 commented 6 years ago
var config = {
    address: "",
    port: 8080,
    ipWhitelist: [],
    language: "en",
    timeFormat: 24,
    units: "metric",

    modules: [
        {
            module: "clock",
            position: "top_left"
        }
    ]

};
Jan-2005 commented 6 years ago

With docker-compose.yml

version: '2'

services:
    fhem:
        restart: always
        expose:
            - "8083"
            - "7072"
            - "8383"
        ports:
            - "8383:8383"
            - "8083:8083"
            - "7072:7072"
        build: fhem
        privileged: true
        devices:
          - "/dev/ttyUSB0:/dev/ttyUSB0"
        volumes:
            - ./fhem/core/:/opt/fhem/
            - /dev/serial/by-id:/dev/serial/by-id

        networks:
            - fhem-network
        depends_on:
            - "mysql"
            - "mqtt"
            - "smartvisu"

    homebridge:
        restart: always
        image: oznu/homebridge
        volumes:
            - ./homebridge/config.json:/homebridge/config.json
            - ./homebridge/package.json:/homebridge/package.json
        environment:
            - TZ=Europe/Berlin
            - PGID=1000
            - PUID=1000
        network_mode: host
        depends_on:
            - "fhem"

    habridge:
        restart: always
        build: habridge
        network_mode: host

    mysql:
        restart: always
        expose:
            - "3306"
            - "33060"
        ports:
            - "3306:3306"
            - "33060:33060"
        image: mysql/mysql-server:5.7
        volumes:
            - ./mysql/init.sql:/docker-entrypoint-initdb.d/fhem-init.sql
            - ./mysql/data:/var/lib/mysql
        environment:
            - MYSQL_RANDOM_ROOT_PASSWORD=yes
        networks:
            - fhem-network

    mqtt:
        restart: always
        expose:
            - "1883"
            - "9001"
        ports:
            - "1883:1883"
            - "9001:9001"
        image: toke/mosquitto
        networks:
            - fhem-network
        volumes:
            - ./mqtt/config/:/mqtt/config/
            - ./mqtt/log/:/mqtt/log/
            - ./mqtt/data/:/mqtt/data/

    nodered:
        restart: always
        expose:
            - "1880"
        ports:
            - "1880:1880"
        image: nodered/node-red-docker:0.18.4
        volumes:
            - ./nodered/data/:/root/data/
        networks:
            - fhem-network
        depends_on:
            - "mqtt"

    smartvisu:
        restart: always
        image: foxi352/smartvisu
        volumes:
            - ./fhem//core/www/smartvisu2.8/:/var/www/html
        ports: 
            - "8082:81"
        networks:
            - fhem-network

    portainer:
        restart: always
        image: portainer/portainer
        volumes:
           - ./portainer/:/data
           - /var/run/docker.sock:/var/run/docker.sock
        ports:
           - "9000:9000"

    magic_mirror:
        restart: always
        image: bastilimbach/docker-magicmirror
        expose:
            - "8080"
        ports:
            - "8080:8080"
        volumes:
            - ./magic_mirror/config:/opt/magic_mirror/config \
            - ./magic_mirror/modules:/opt/magic_mirror/modules \
            - ./magic_mirror/css:/opt/magic_mirror/css/custom.css \
        networks:
            - fhem-network

    alexa:
       restart: always

       expose: 
            - "3000"
       ports:
            - "3000:3000"
       image: bananarama/x86-alexa-fhem:latest

       volumes:
            - ./alexa/config:/config

       networks:
            - fhem-network
       depends_on:
            - "fhem"

networks:
        fhem-network:
            driver: bridge

config not Found

Jan-2005 commented 6 years ago

Config Folder :

/home/intelnuc/fhem-docker/magic_mirror/config/config.js

Jan-2005@web.de

bastilimbach commented 6 years ago

@Jan-2005 sorry for the late response. I just double checked with a fresh install of this docker image. Are you sure, that you did use the newest version?

I started the Docker container with the command provided in the README:

docker run  -d \
    --publish 80:8080 \
    --restart always \
    --volume ~/magic_mirror/config:/opt/magic_mirror/config \
    --volume ~/magic_mirror/modules:/opt/magic_mirror/modules \
    --name magic_mirror \
    bastilimbach/docker-magicmirror

I checked the logs using docker logs magic_mirror which stated that magic mirror started using the newest version: "Starting MagicMirror: v2.4.1"

I also got the error message "WARNING! Could not find config file. Please create one. Starting with default configuration." which is expected because I didn't create the config file yet. So I renamed the config.js.sample file in the config folder to config.js and edited the important bits according to the README:

I saved the file and restarted the container using docker restart magic_mirror and everything worked as expected.

Could you please check if your config.js contains the following JavaScript code at the bottom of the file:

if (typeof module !== "undefined") {module.exports = config;}

Also please try to remove the docker image bastilimbach/docker-magicmirror and download it again.

bastilimbach commented 6 years ago

I'm closing this issue, due to the lack of any response. I assume you fixed the problem. Feel free to reopen the issue.

Jan-2005 commented 5 years ago

Starting MagicMirror: v2.6.0

Loading config ...

WARNING! Could not find config file. Please create one. Starting with default configuration.

ading module helpers ...

Initializing new module helper ...

Module helper loaded: updatenotification

No helper found for module: helloworld.

l module helpers loaded.

Starting server on port 8080 ...

Server started ...

Connecting socket for: updatenotification

Sockets connected & modules started ...

Ready to go! Please point your browser to: http://localhost:8080

Config ist vorhanden , meckert das Config nicht da ist. Zeig auch nichts unter 8080 an.

tc60045 commented 5 years ago

2.6.0 appears to be the latest in the "latest build" for this repo, making it 2508 commits behind.

I suspect there is something preventing Travis from compiling your build properly -- an issue you had before in one of the other tickets. Please try installing a new container and you'll see this problem persists with latest build here != latest build.

latest: Pulling from bastilimbach/docker-magicmirror Digest: sha256:90fcd76cd419bc3a2202294c6af5924b05812df8568e7dc15460a8e4e446aefa Status: Image is up to date for bastilimbach/docker-magicmirror:latest f0510aafdbbf7a88150c855de37d9baaa97ef587e0d0214b99dc6aad375a465b mmirror Starting MagicMirror: v2.6.0