The DockerCompose runs but the container endlessly restarts with the error
sh: 1: ./node_modules/.bin/electron: not found
which seems to be because Electron is not installed in the karsten13 DockerFile.
It seems like my only option at this point is to create my own DockerFile, possibly based around one of these DockerFiles, which I assume are official?
I ended up coming up with this DockerCompose, which seems to work but is slightly-different from the multiple different DockerCompose files that I’ve seen.
Specifically the
"
volumes:
- magicmirror_data:/opt/magic_mirror/config
- magicmirror_data:/opt/magic_mirror/modules
- magicmirror_data:/opt/magic_mirror/css
"
is different from what I saw here but it seems to work? I’ll need to see whether all of the data is actually being safely kept in the volumes.
I also pulled this part from the same serveronly.yml file, which I added.
Then needed to create an .env file
I commented out a lot of stuff that was in there… the important one is that it specifies server mode. read the env notes to see if they apply to your setup
# Possible values: "server" or "electron" or "client":
MM_SCENARIO="server"
# You can disable the init container (which corrects volume permissions) by changing MM_INIT to "no".
# You must specify "no" when using scenario "client".
# In most usecases you need to run the init container on first start and can then disable it.
# possible values: "init" or "no":
MM_INIT="init"
# Permissions used in init container:
MM_UID="1000"
MM_GID="1000"
MM_CHMOD="777"
# Docker Image to use:
MM_IMAGE="karsten13/magicmirror:latest"
# Port mapping used for scenario "server":
MM_SERVER_PORTS="8080:8080"
# Volume Mounts
#MM_MODULES_DIR="modules"
#MM_MODULES_DIR="config"
#MM_CSS_DIR="css"
#MM_CSS_DIR="config"
#MM_CUSTOMCSS_FILE=${MM_CSS_DIR}/custom.css
#VOLUME_CONFIG="../../mounts/config:/opt/magic_mirror/config"
#VOLUME_MODULES="../../mounts/${MM_MODULES_DIR}:/opt/magic_mirror/${MM_MODULES_DIR}"
#VOLUME_CSS="../../mounts/${MM_CSS_DIR}:/opt/magic_mirror/${MM_CSS_DIR}"
# Port and ip address used for scenario "client":
#MM_CLIENT_PORT="8080"
#MM_CLIENT_ADDRESS="192.168.0.1"
# If you want to use https://github.com/Bee-Mar/mmpm you can add
# the mmpm container to this setup by changing MM_MMPM to "mmpm".
# Possible values: "mmpm" or "no":
#MM_MMPM="no"
# If you need to use a xserver e.g. on distribution without gui
# Possible values: "xserver" or "no":
MM_XSERVER="xserver"
# Use following params to set orientation, scaling, port of the xserver,
# example for XRANDR_PARAMS="--output HDMI-1 --rotate left --scale 1.9"
#XRANDR_PARAMS=""
# Time to wait for the xserver to start before executing xrandr command
#XRANDR_DELAY="5s"
# For the following parameters see https://khassel.gitlab.io/magicmirror/configuration/
MM_OVERRIDE_DEFAULT_MODULES="true"
MM_OVERRIDE_CSS="true"
MM_SHOW_CURSOR="false"
# set the project name (see https://docs.docker.com/compose/environment-variables/envvars/#compose_project_name):
COMPOSE_PROJECT_NAME=magicmirror
# Watchtower Setup
# Possible values: "watchtower" or "no":
#MM_WATCHTOWER="no"
# Interval in seconds checking for new images:
#MM_WATCHTOWER_INTERVAL=300
# if set to "--cleanup" old images are deleted, otherwise set to "":
#MM_WATCHTOWER_CLEANUP="--cleanup"
Finally, I changed ownership of the folder to that userid
docker logs show it’s running 2.29.0 server and no errors