Closed PatrickGlatz closed 11 months ago
It might be worth to have a look at the log files of the companion. By default they are located under /tmp or /printer_data/logs. Since you are running a container it should be /tmp rather than /printer_data
You can also check if the companion itself is started within the container by attaching to the container's CLI and verifying running systemctl status mobileraker.service.
Edit: Nvm. the container is directly starting the python file. So the container logs reflect the companion logs.
@Clon1998 That was a good hint. The docker container log mentions a wrong path of the config file and thus not taking the co figured IP adress but the default one, and i dont know how to correct that, see log output below. Seems as if the default of 127.0.0.1 is not working when using docker? I thought that i have done everything correct.
As mentioned i have created the docker-compose.yml as well as the mobileraker.conf, then i started to install the container from inside of /home/user/mobileraker_companion/ using (not passing any config)
docker compose up -d
Do you have a hint, on how to resolve that issue? Whatever i try, it doesnt take the mobileraker.conf file. Also the config from the container mentions wrong addresses.
Honestly, this is my first docker project, but i thought it would be a good entry point. So maybe you can give me a guideline.
Thanks in advance Patrick
/home/user/mobileraker_companion/docker-compose.yml
services:
mobileraker_companion:
image: ghcr.io/clon1998/mobileraker_companion:latest
volumes:
- /path/to/mobileraker.conf:/home/user/printer_data/config/mobileraker.conf
/home/user/printer_data/config/mobileraker.conf
[general]
language: en
# one of the supported languages defined in i18n.py#languages (de,en,...)
# Default: en
timezone: Europe/Berlin
# correct timezone e.g. Europe/Berlin for Berlin time or US/Central.
# For more values see https://gist.github.com/heyalexej/8bf688fd67d7199be4a1682b3eec7568
# Default: Tries to use system timezone
# Optional
eta_format: %%Y-%%m-%%d %%H:%%M:%%S
# Format used for eta and adaptive_eta placeholder variables
# For available options see https://strftime.org/
# Note that you will have to escape the % char by using a 2nd one e.g.: %d/%m/%Y -> %%d/%%m/%%Y
# Default: %%d.%%m.%%Y, %%H:%%M:%%S
# Optional
include_snapshot: False
# !! SUPPORTER ONLY - This feature requires beeing a supporter of Mobileraker as of now!
# Include a snapshot of the webcam in any print status/progress update notifications
# Default: True
# Optional
# Add a [printer ...] section for every printer you want to add
[printer Ender 3 S1 Plus]
moonraker_uri: ws://192.168.123.12:7125/websocket
# Define the uri to the moonraker instance.
# Default value: ws://127.0.0.1:7125/websocket
# Optional
moonraker_api_key: False
# Moonraker API key if force_logins or trusted clients is active!
# Default value: False
# Optional
snapshot_uri: http://192.168.123.12/webcam/?action=snapshot
# !! SUPPORTER ONLY - This feature requires beeing a supporter of Mobileraker as of now!
# The ABSOLUT url to the webcam, the companion should make a screenshot of.
# Default:
# Optional
snapshot_rotation: 0
# The rotation applied to the image. Valid values : 0, 90, 180, 270
# Default: 0
# Optional
$ docker logs c8a6423718fa
2023-11-29 21:08:03 root INFO MobilerakerCompanion version: ?
2023-11-29 21:08:03 root INFO Passed config file is: printer_data/config/mobileraker.conf
2023-11-29 21:08:03 root INFO Checking mobileraker_companion dir
2023-11-29 21:08:03 root INFO Checking klipper_config dir
2023-11-29 21:08:03 root INFO Checking printer_data/config dir
2023-11-29 21:08:03 root INFO Checking user dir
2023-11-29 21:08:03 root WARNING No config file was found, using default fallback values!
2023-11-29 21:08:03 root INFO Read 1 printer config sections
2023-11-29 21:08:03 root INFO Main section read, language:"en", timezone:"Etc/UTC", eta_format:"%d.%m.%Y, %H:%M:%S", include_snapshot:"True"
2023-11-29 21:08:03 py.warnings WARNING /opt/mobileraker/mobileraker.py:44: DeprecationWarning: There is no current event loop
event_loop = asyncio.get_event_loop()
2023-11-29 21:08:03 mobileraker.jrpc INFO Trying to connect to: ws://127.0.0.1:7125/websocket api key <NO API KEY>
2023-11-29 21:08:03 websockets.client INFO ! connect failed; reconnecting in 1.4 seconds
Traceback (most recent call last):
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 598, in __aiter__
async with self as protocol:
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 633, in __aenter__
return await self
^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 650, in __await_impl_timeout__
return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 510, in wait_for
return await fut
^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
transport, protocol = await self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1099, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1081, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 984, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 647, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 687, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 7125)
2023-11-29 21:08:04 websockets.client INFO ! connect failed again; retrying in 3 seconds
Traceback (most recent call last):
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 598, in __aiter__
async with self as protocol:
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 633, in __aenter__
return await self
^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 650, in __await_impl_timeout__
return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 510, in wait_for
return await fut
^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
transport, protocol = await self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1099, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1081, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 984, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 647, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 687, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 7125)
2023-11-29 21:08:07 websockets.client INFO ! connect failed again; retrying in 5 seconds
Traceback (most recent call last):
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 598, in __aiter__
async with self as protocol:
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 633, in __aenter__
return await self
^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 650, in __await_impl_timeout__
return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 510, in wait_for
return await fut
^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
transport, protocol = await self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1099, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1081, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 984, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 647, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 687, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 7125)
2023-11-29 21:08:12 websockets.client INFO ! connect failed again; retrying in 8 seconds
Traceback (most recent call last):
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 598, in __aiter__
async with self as protocol:
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 633, in __aenter__
return await self
^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 650, in __await_impl_timeout__
return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 510, in wait_for
return await fut
^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
transport, protocol = await self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1099, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1081, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 984, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 647, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 687, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 7125)
2023-11-29 21:08:20 websockets.client INFO ! connect failed again; retrying in 13 seconds
Traceback (most recent call last):
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 598, in __aiter__
async with self as protocol:
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 633, in __aenter__
return await self
^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 650, in __await_impl_timeout__
return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 510, in wait_for
return await fut
^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
transport, protocol = await self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1099, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1081, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 984, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 647, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 687, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 7125)
docker inspect c8a6423718fa
[
{
"Id": "c8a6423718fad114a5a440f2b5cc5bc6cc264c7e80059ad26545675f546725c6",
"Created": "2023-11-29T21:07:59.152387243Z",
"Path": "venv/bin/python",
"Args": [
"mobileraker/mobileraker.py",
"-c",
"printer_data/config/mobileraker.conf"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 5040,
"ExitCode": 0,
"Error": "",
"StartedAt": "2023-11-29T21:08:00.321890968Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:6603d9fb89fadf40090813fed290f7b0ab135184eed307d4bec633c76c3ae178",
"ResolvConfPath": "/var/lib/docker/containers/c8a6423718fad114a5a440f2b5cc5bc6cc264c7e80059ad26545675f546725c6/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/c8a6423718fad114a5a440f2b5cc5bc6cc264c7e80059ad26545675f546725c6/hostname",
"HostsPath": "/var/lib/docker/containers/c8a6423718fad114a5a440f2b5cc5bc6cc264c7e80059ad26545675f546725c6/hosts",
"LogPath": "/var/lib/docker/containers/c8a6423718fad114a5a440f2b5cc5bc6cc264c7e80059ad26545675f546725c6/c8a6423718fad114a5a440f2b5cc5bc6cc264c7e80059ad26545675f546725c6-json.log",
"Name": "/mobileraker_companion-mobileraker_companion-1",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/path/to/mobileraker.conf:/home/user/printer_data/config/mobileraker.conf:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "mobileraker_companion_default",
"PortBindings": {},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
0,
0
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "private",
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": [],
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware",
"/sys/devices/virtual/powercap"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/42a91bb0481f0f4596b1ee352f34f131771c39dffae7cc966c6dbaf431e7ea6d-init/diff:/var/lib/docker/overlay2/a787c3e1cda93c32176fb9653149aecbc90067e76d3ba86f06c3b7f48098b986/diff:/var/lib/docker/overlay2/d79573fab5a5f06ddcb6065d5084ca4fd9dba66bae6d5a6ad20bd31dc1d904d7/diff:/var/lib/docker/overlay2/9625177b73f183d16e6ecf68d246d0699fa7432829b469be5732109d613487f9/diff:/var/lib/docker/overlay2/b5cdd41f5f15463b3ab2ac50b12c3a3e839fb37bce105e41d671b2fbd89bc2d9/diff:/var/lib/docker/overlay2/3a0a103f00546d6a93e1c9a5dbcad7d39f4fc6090b8e360400387f5536c2fd97/diff:/var/lib/docker/overlay2/bf33bc2d5c6b39d887ca662f2bc62e9db712d94b30c129fb1ac3c47f58f13c75/diff:/var/lib/docker/overlay2/a8a1923e3e942313dbaae953fc7e970a72f55e1546f8fe7f091fd67943daddfd/diff:/var/lib/docker/overlay2/bf550cb6e98de246241b37d344b9709706623279a20c65ed69c6e199aae8449f/diff:/var/lib/docker/overlay2/299b2e3e0036eeb641077d1cb739c786b8c799c3a7c5ea5dca07dcbd1dab51b0/diff:/var/lib/docker/overlay2/f99688028e47fcfa24ccb4840393ae583e00120b2233e4d5b3acf1587f9730b7/diff:/var/lib/docker/overlay2/c3ad80a7197dfc09f34f617e0e7eec2216a8f3eba245f7da9a7449d7b088906c/diff",
"MergedDir": "/var/lib/docker/overlay2/42a91bb0481f0f4596b1ee352f34f131771c39dffae7cc966c6dbaf431e7ea6d/merged",
"UpperDir": "/var/lib/docker/overlay2/42a91bb0481f0f4596b1ee352f34f131771c39dffae7cc966c6dbaf431e7ea6d/diff",
"WorkDir": "/var/lib/docker/overlay2/42a91bb0481f0f4596b1ee352f34f131771c39dffae7cc966c6dbaf431e7ea6d/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/path/to/mobileraker.conf",
"Destination": "/home/user/printer_data/config/mobileraker.conf",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "f80ea5f067c1325f9ad63f0e998a451c91a02aef220b07f896d6819c14b75a27",
"Source": "/var/lib/docker/volumes/f80ea5f067c1325f9ad63f0e998a451c91a02aef220b07f896d6819c14b75a27/_data",
"Destination": "/opt/printer_data/config",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "c8a6423718fa",
"Domainname": "",
"User": "mobileraker",
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305",
"PYTHON_VERSION=3.12.0",
"PYTHON_PIP_VERSION=23.2.1",
"PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/c6add47b0abf67511cdfb4734771cbab403af062/public/get-pip.py",
"PYTHON_GET_PIP_SHA256=22b849a10f86f5ddf7ce148ca2a31214504ee6c83ef626840fde6e5dcd809d11"
],
"Cmd": [
"-c",
"printer_data/config/mobileraker.conf"
],
"Image": "ghcr.io/clon1998/mobileraker_companion:latest",
"Volumes": {
"/opt/printer_data/config": {}
},
"WorkingDir": "/opt",
"Entrypoint": [
"venv/bin/python",
"mobileraker/mobileraker.py"
],
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "84f53ed377e6a0568cf86599099be2f4cf44946a239e2af24310328d1ffa66be",
"com.docker.compose.container-number": "1",
"com.docker.compose.depends_on": "",
"com.docker.compose.image": "sha256:6603d9fb89fadf40090813fed290f7b0ab135184eed307d4bec633c76c3ae178",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "mobileraker_companion",
"com.docker.compose.project.config_files": "/home/user/mobileraker_companion/docker-compose.yml",
"com.docker.compose.project.working_dir": "/home/user/mobileraker_companion",
"com.docker.compose.service": "mobileraker_companion",
"com.docker.compose.version": "2.21.0",
"org.opencontainers.image.created": "2023-11-19T01:11:59.166Z",
"org.opencontainers.image.description": "Companion for mobileraker, enabling push notification.",
"org.opencontainers.image.licenses": "MIT",
"org.opencontainers.image.revision": "81ae9a04fca856969c2330721d2effac9014625a",
"org.opencontainers.image.source": "https://github.com/Clon1998/mobileraker_companion",
"org.opencontainers.image.title": "mobileraker_companion",
"org.opencontainers.image.url": "https://github.com/Clon1998/mobileraker_companion",
"org.opencontainers.image.version": "latest"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "c061bd3074b19b3cb0d77264f08ea61a787747b8348dde6b9a77d2a9c95db5c9",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/c061bd3074b1",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"mobileraker_companion_default": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"mobileraker_companion-mobileraker_companion-1",
"mobileraker_companion",
"c8a6423718fa"
],
"NetworkID": "f180c01181a87aaf9f420c02332e0dabac1c48383e4a01d230090616ed10f62e",
"EndpointID": "5d65d121ac3ac7adf54638a20fd3d6af8e530098170e11a779b277cbbd3f6868",
"Gateway": "172.19.0.1",
"IPAddress": "172.19.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:13:00:02",
"DriverOpts": null
}
}
}
}
]
Thanks for the support
services: mobileraker_companion: image: ghcr.io/clon1998/mobileraker_companion:latest volumes:
- /path/to/mobileraker.conf:/home/user/printer_data/config/mobileraker.conf
The compose file looks good.
However, you need to make sure that you set the correct host path for the mobileraker.conf file. Currently, you set the host path to /path/to/mobileraker.conf
.
I don't know where you placed the config file but lets say I placed mine at /etc/home/mobileraker.conf
on my host machine.
My compose file would look like this:
services:
mobileraker_companion:
image: ghcr.io/clon1998/mobileraker_companion:latest
volumes:
- /etc/home/mobileraker.conf:/home/user/printer_data/config/mobileraker.conf
@Clon1998 FANTASTIC. I have simply replaced the wrong side of the volumes definition. So finally it ends up with this:
cat /home/user/mobileraker_companion/docker-compose.yml
services:
mobileraker_companion:
image: ghcr.io/clon1998/mobileraker_companion:latest
volumes:
- /home/user/printer_data/config/mobileraker.conf:/opt/printer_data/config/mobileraker.conf
Within /home/user/mobileraker_companion i did a
docker down
followed by
docker compose up --build -d
and directly my iPhone made "PING" :)
Thanks for pointing me in the right direction!
Regards and thanks for this tool! Patrick
Hi
although i have mobileraker_companion installed via Docker at ~/mobileraker_companion (mobileraker.conf is at ~/mobileraker_companion/mobileraker.conf) my iPhone does mention, that Companion is not found (see picture). The container is running
$ docker inspect -f '{{.State.Status}}' mobileraker_companion-mobileraker_companion-1 running
$ docker ps --all CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4a7f86f523c4 ghcr.io/clon1998/mobileraker_companion:latest "venv/bin/python mob…" 25 minutes ago Up 19 minutes mobileraker_companion-mobileraker_companion-1 fa49174fa15a ghcr.io/donkie/spoolman:latest "uvicorn spoolman.ma…" 17 hours ago Up 17 hours 0.0.0.0:7912->8000/tcp, :::7912->8000/tcp spoolman-spoolman-1
So the general app is working, i can see the webacm, control everything etc. But companion does not seem to connect. Do you have an advice where to look at? Didn't found any hints or description.
Thanks in advance Patrick