Files

Pybricks Code

Pybricks is Python coding for smart LEGO® hubs. Run MicroPython scripts directly on the hub, and get full control of your motors and sensors.

Installation using Portainer

Tested with

  • Synology DS1019+ running DSM 7.2-64570 Update 1;
  • Docker from Synology Package Center version 20.10.23-1437;
  • Portainer.io Community Edition version 2.19.1;
  • Node 18.18.2-bookworm;
  • Pybricks Code v2.1.1.

Installation steps

  • Open Portainer with the correct environment.
  • Under Stacks click the button + Add stack.
  • Give your stack a name (i.e.: pybricks).
  • Paste the contents of compose.yml under Web editor.
  • Paste the contents of .env under Environment variables.
    • Click Advanced mode to be able to paste.
  • Change the environment variables as you see fit.
  • Click Deploy the stack and wait for Portainer to finish.
    • This can take a very long time as the container is downloading and building the software and all the necessary libraries. Check the Container log to see the current status.

Environment variables

The following variables could be set as an environment varaiables using the .env file.

Value Default Information
RESTART unless-stopped Choose a restart policy.
PYBRICKSCODE_CONTAINER_NAME PybricksCode This is used for the name of the container and the main folder under de docker folder.
PYBRICKSCODE_TAG latest Choose a version tag.
PYBRICKSCODE_PORT 80 Default port.

Disclaimer

LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this project.