Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

This document is incomplete

Before You Start

Create a Dockerfile for Your Service

  • Create a Dockerfile at tutormyplugin/templates/myplugin/build/myplugin/Dockerfile

    • If you aren’t sure what your service needs take a look at tutor-contrib-exams as a minimal example

    • This section could probably use more guidance on Dockerfiles

  • Add an image build hook to tutormyplugin/plugin.py

    ################# Docker image management
    # To build an image with `tutor images build myimage`, add a Dockerfile to templates/exams/build/myimage and write:
    hooks.Filters.IMAGES_BUILD.add_item((
        "myplugin",
        ("plugins", "myplugin", "build", "myplugin"),
        "{{ MYPLUGIN_DOCKER_IMAGE }}",
        (),
    ))
  • Take note of MYPLUGIN_DOCKER_IMAGE we need to define this config value in plugin.py as well

    ########################################
    # CONFIGURATION
    ########################################
    
    hooks.Filters.CONFIG_DEFAULTS.add_items(
        [
            # Add your new settings that have default values here.
            # Each new setting is a pair: (setting_name, default_value).
            # Prefix your setting names with 'MYPLUGIN_'.
            ("MYPLUGIN_VERSION", __version__),
            ("MYPLUGIN_DOCKER_IMAGE", f'myplugin:{__version__}'),
        ]
    )
    
  • Add docker-compose patches to tutormyplugin/patches to get your service running locally

Setup Django Settings and Configuration Values

TODO

Provisioning and Initialization Tasks

TODO

  • No labels