Skip to content

Archive Trac docs module depend

madscatt edited this page Jun 20, 2026 · 1 revision

Docs Module Depend

Legacy Trac archive page imported from docs_module_depend. Source: https://genapp.rocks/wiki/wiki/docs_module_depend. Review age, links, and examples before treating as current.

defining module dependencies

  • module executable dependencies list dependency info

  • this section is used for installers and to generate docker images.

  • the JSON to include at the top level of the module definition file lists tags and their values

  • the tags can be: || tag || value || example(s) || description || || base || string || "base" : "perl"br"base" : "python"br"base" : "ubuntu" || the primary language used - if applicable || || cpan || string or list of strings || "cpan" : "JSON"
    "cpan" : [ "JSON", "MIME::Base64" ] || CPAN module(s) to install || || pip || string or list of strings || "pip" : "numpy scipy matplotlib"br"pip" : [ "numpy scipy", "matplotlib" ] || Python PIP package(s) to install || || conda || string or list of strings || "conda" : "scipy"br"conda" : [ "numpy scipy=0.15 -n py34_env", "matplotlib" ] || Python conda package(s) to install || || run || string or list of strings || "run" : "git clone !https://github.com/ehb54/jspdb.git" br "run" : [ "git clone !https://github.com/ehb54/jspdb.git" , "ls" ] || run command(s) || || run-os || string or list of strings || "run-ubuntu" : "apt-get install -y someapt"br"run-centos" : [ "yum install xyz", "mkdir -p /x/y/z" ] || run os specific command(s) || || run-os-version || string or list of strings || "run-ubuntu-16" : "apt-get install -y someapt"br"run-centos-7" : [ "yum install xyz", "mkdir -p /x/y/z" ] || run os-version specific command(s) || || file || string or list of strings || "file" : "somefile"br"file" : [ "my-dependency-1", "my-dependency-2" ] || extra file(s) needed, note the defined executable is not needed || || env || string or list of strings || "env" : "MYENV=xyz" br "env" : [ "MYENV=xyz", "MYENV2=abc" ] || environment variable(s) to set ||

  • each tag can be repeated as many times as needed except for the "base" tag, which can only be entered once and must be the first entry

  • the processing is in sequential order, so cmd's processed and file's will be added in the sequence specified.

  • dependencies examples:

    • demo/energy (a perl script)
    ,"dependencies" : [
        { "base" : "perl" }
        ,{ "cpan" : "JSON" }
    ]
  • demo/penergy (a python script requiring files [really only one of the .py or .pyc are needed)
    ,"dependencies" : [
        { "base" : "python" }
        ,{ "file" : [ "mass_energy.pyc", "mass_energy.py" ] }
    ]

run docker locally

  • to run docker locally
  • install docker
  • add the apache user (www-data or apache or httpd or ?) to the docker group
  • example appconfig JSON resource (here apache user is www-data, typical for ubuntu):
     ,"resources": {
        "local" : ""
        ,"docker-local" : "docker run -v __rundir__:/genapp/run --user www-data genapp___application_____menu:id_____menu:modules:id__ /genapp/bin/__menu:modules:id__"
     }

to do

Clone this wiki locally