Read the statement by Michael Teeuw here.
Error on loading .css
-
show us your setup. How did you start the container? If with the provided setup goto the
magicmirror/rundir and show the output ofdocker compose configand output ofcat .env, if with adocker run ...command show the full command.I suspect you are using an outdated setup which mounts the whole css dir instead only
custom.cssfile, I changed this a few months ago … -
@karsten13 said in Error on loading .css:
I suspect you are using an outdated setup which mounts the whole css dir instead only custom.css file, I changed this a few months ago …
I’m sorry, I don’t understand your words here
we should expose the folder for users that want/need to load other font librariesthis is my docker compose config output
magicmirror: container_name: mm environment: HOST_HOSTNAME: ds-data MM_CUSTOMCSS_FILE: css/custom.css MM_MODULES_DIR: modules MM_OVERRIDE_CSS: "true" MM_OVERRIDE_DEFAULT_MODULES: "true" MM_SCENARIO: server MM_SHOW_CURSOR: "false" image: karsten13/magicmirror:latest networks: default: null ports: - mode: ingress target: 8080 published: "8080" protocol: tcp - mode: ingress target: 9000 published: "9000" protocol: tcp restart: unless-stopped volumes: - type: bind source: /var/services/homes/sam/magicmirror/mounts/config target: /opt/magic_mirror/config bind: create_host_path: true - type: bind source: /var/services/homes/sam/magicmirror/mounts/modules target: /opt/magic_mirror/modules bind: create_host_path: true - type: bind source: /var/services/homes/sam/magicmirror/mounts/css target: /opt/magic_mirror/css bind: create_host_path: true -
I changed the setup for css to
- type: bind source: /var/services/homes/sam/magicmirror/mounts/css/custom.css target: /opt/magic_mirror/css/custom.css bind: create_host_path: trueIt was a design mistake in the beginning to mount the whole folder instead the single file.
This is maybe not backward compatibel for all old setups.
-
Hi,
Thanks for your reply.
I use portainer and Watchtower to automatic upgrade the Docker image. This is the stack I use:
version: '3' services: magicmirror: container_name: magicmirror-1 image: karsten13/magicmirror:latest cap_add: - NET_ADMIN - NET_RAW network_mode: deellan ports: - "4885:8080" volumes: - /volume2/docker/magicmirror-1/config:/opt/magic_mirror/config - /volume2/docker/magicmirror-1/modules:/opt/magic_mirror/modules - /volume2/docker/magicmirror-1/css:/opt/magic_mirror/css restart: unless-stopped command: - npm - run - server -
@bdeelman said in Error on loading .css:
- /volume2/docker/magicmirror-1/css:/opt/magic_mirror/css
then try it with changing the above line to
- /volume2/docker/magicmirror-1/css/custom.css:/opt/magic_mirror/css/custom.css -
