Skip to content

Commit dd8e356

Browse files
committed
2023-05-16 OctoPrint adaptation to expected kernel change - old-menu branch - PR 2 of 2
Background: - SensorsIot#690 – Kernel update may remove /dev/ttyAMA0 Changes: 1. Adopts generic syntax for device specification to prompt user to add the relevant key (`OCTOPRINT_DEVICE_PATH`) and path (eg `/dev/ttyUDB0`) to `.env`. Example: ``` $ echo OCTOPRINT_DEVICE_PATH=/dev/ttyUSB0 >>~/IOTstack/.env ``` 2. Adopts `TZ=${TZ:-Etc/UTC}` 3. Corrects YAML "errors" identified by `yamllint`. Signed-off-by: Phill Kelley <[email protected]>
1 parent fea7968 commit dd8e356

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.templates/octoprint/service.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
image: octoprint/octoprint
44
restart: unless-stopped
55
environment:
6-
- TZ=Etc/UTC
7-
# - ENABLE_MJPG_STREAMER=true
8-
# - MJPG_STREAMER_INPUT=-r 640x480 -f 10 -y
9-
# - CAMERA_DEV=/dev/video0
6+
- TZ=${TZ:-Etc/UTC}
7+
# - ENABLE_MJPG_STREAMER=true
8+
# - MJPG_STREAMER_INPUT=-r 640x480 -f 10 -y
9+
# - CAMERA_DEV=/dev/video0
1010
ports:
1111
- "9980:80"
1212
devices:
13-
- /dev/ttyAMA0:/dev/ttyACM0
14-
# - /dev/video0:/dev/video0
13+
- "${OCTOPRINT_DEVICE_PATH:?eg echo OCTOPRINT_DEVICE_PATH=/dev/serial0 >>~/IOTstack/.env}:/dev/ttyACM0"
14+
# - /dev/video0:/dev/video0
1515
volumes:
1616
- ./volumes/octoprint:/octoprint
1717

0 commit comments

Comments
 (0)