Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Make plugins persistent #103

Closed
Ilruz opened this issue Nov 23, 2020 · 4 comments
Closed

[Feature] Make plugins persistent #103

Ilruz opened this issue Nov 23, 2020 · 4 comments
Projects

Comments

@Ilruz
Copy link

Ilruz commented Nov 23, 2020

Describe the bug
Recommended docker compose file at https://github.com/OctoPrint/octoprint-docker/blob/master/docker-compose.yml won't work under the latest docker compose. Can also be easily fixed and improved to support permanent plugins, between images.

To Reproduce
Steps to reproduce the behavior:

  1. Curl locally https://github.com/OctoPrint/octoprint-docker/blob/master/docker-compose.yml
  2. execute docker-compose up --detach
  3. Docker error will fire immediately, as
    ports:
    • 80:80
      is expecting a string.

Expected behavior

  1. Docker container won't start, due to some minor sintax issue.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

docker --version
Docker version 19.03.13, build 4484c46

docker-compose  --version
docker-compose version 1.27.4, build unknown

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

new suggested docker-compose.yml

version: '2.4'

services:
  octoprint:
    container_name: octoprint
    image: octoprint/octoprint
    restart: unless-stopped
    ports:
    - "80:80"
    devices:
    - /dev/ttyUSB0:/dev/ttyUSB0
    # - /dev/ttyACM0:/dev/ttyACM0
    # - /dev/video0:/dev/video0
    volumes:
     - octoprint:/octoprint

    # This volume will make the plugin permanent during restarts or image upgrade
     - octoprint-packages:/usr/local/lib/python3.8/sitepackages

    # uncomment the lines below to ensure camera streaming is enabled when
    # you add a video device
    #environment:
    #  - ENABLE_MJPG_STREAMER=true

  ####
  # uncomment if you wish to edit the configuration files of octoprint
  # refer to docs on configuration editing for more information
  ####

#config-editor:
  #  image: linuxserver/code-server
  #  ports:
  #    - 8443:8443
  #  depends_on:
  #    - octoprint
  #  restart: unless-stopped
  #  environment:
  #    - PUID=0
  #    - GUID=0
  #    - TZ=America/Chicago
  #  volumes:
  #    - octoprint:/config

#below directives will create a volume only if does not exist already
volumes:
  octoprint:
    external: false
  octoprint-packages:
    external: false
@Ilruz Ilruz added the bug label Nov 23, 2020
@Ilruz Ilruz changed the title [BUG] Bug Description [BUG] docker-compose won't create the container Nov 23, 2020
@LongLiveCHIEF
Copy link
Member

in regards to the 'expected string or buffer' issue for ports, this is indicative of a distro issue, see: docker/compose#4972

in regards to the making plugins persistent, that is a super awesome suggestion, and I'll probably look at working it into the work I'm doing on the https://github.com/OctoPrint/octoprint-docker/tree/run-s6-as-octoprint-user branch.

@LongLiveCHIEF LongLiveCHIEF changed the title [BUG] docker-compose won't create the container [Enhancement] Make plugins persistent Nov 25, 2020
@LongLiveCHIEF LongLiveCHIEF changed the title [Enhancement] Make plugins persistent [Feature] Make plugins persistent Nov 25, 2020
@LongLiveCHIEF
Copy link
Member

we do have PYTHONUSERBASE set to /octoprint/plugins in the Dockerfile, so if i'm understanding python correctly, that should make the site packages directory relative to that path. It's possible though that since we're using s6, that this env is not loaded.

This may actually be a bug, but I'll have to do more digging.

@LongLiveCHIEF LongLiveCHIEF added this to In Progress in Roadmap Nov 28, 2020
@GitIssueBot
Copy link

This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there:

https://community.octoprint.org/t/backup-restore-fails-on-device-or-resource-busy/27182/3

@LongLiveCHIEF LongLiveCHIEF moved this from In Progress to Completed in Roadmap Dec 8, 2020
@LongLiveCHIEF
Copy link
Member

closed via #132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
Completed
Development

No branches or pull requests

3 participants