compose-plugin console connect

  • Hello,


    Hi there,


    I got a question, did not find anything like it in the forum. Maybe it's just a Layer 8 problem (user).

    For creating a superuser for paperless-ngx one has to connect a console into the paperless_webserver_1 container and run the command "python3 manage.py createsuperuser"

    Since the stack was created by the compose plugin is there no way to attach the console with portainer and the plugin does not provide such option or at least I can't find it.


    Would it be possible to integrate a console connect?


    Regards

    Frank

    • Official Post

    Would it be possible to integrate a console connect?

    Unfortunately, it isn't possible for an OMV plugin to do that in the OMV web interface. I've looked for solutions but haven't found one. Currently the only two solutions are ssh console (you could use wetty) or portainer. I guess I could add something to the plugin to at least give the command to enter the console from an ssh session.

    omv 8.2.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.4 | compose 8.1.12 | cterm 8.0 | borgbackup 8.1.9 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.3 | writecache 8.1.10


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Official Post

    portainer is not an option, refuse to connect because compose-pluging is the owner.

    portainer is an option if you move that container to it. If people don't want to use the command line, there aren't many options.

    omv 8.2.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.4 | compose 8.1.12 | cterm 8.0 | borgbackup 8.1.9 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.3 | writecache 8.1.10


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Would it be possible to integrate a console connect?

    Via ssh, isn't it just a matter of:

    docker exec paperless_webserver_1 "python3 manage.py createsuperuser"


    OR if you need to have the console:

    docker exec -it paperless_webserver_1 bash


    Why the need to mimmick Portainer when the compose wasn't created for that? (read: to clone Portainer)

  • Via ssh, isn't it just a matter of:

    docker exec paperless_webserver_1 "python3 manage.py createsuperuser"

    It is, although if the plugin/portainer doesn't have it, an option of post actions would be nice to run such a command. I still have a "mailu" setup that is a mix of compose and run commands because I can't automate it purely in compose (and I'm too lazy to convert the compose to run commands).

    • Official Post

    an option of post actions would be nice to run such a command

    It wouldn't be hard to run a command but knowing if the command had already been run would be difficult. And if that command is interactive, it wouldn't work from the plugin.


    I could add a feature to the plugin to run a command but I don't have a way to show output.

    omv 8.2.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.4 | compose 8.1.12 | cterm 8.0 | borgbackup 8.1.9 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.3 | writecache 8.1.10


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • if that command is interactive, it wouldn't work... I don't have a way to show output.

    That's a significant hurdle. Although since it runs as su I guess password prompts wouldn't be an issue. Maybe use <(echo "command") or similar for the rest...? Yeh without output it does seem like a half-bad idea.

    • Official Post

    Although since it runs as su I guess password prompts wouldn't be an issue. Maybe use <(echo "command") or similar for the rest...?

    Password prompts aren't an issue since it effectively runs as root.

    omv 8.2.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.4 | compose 8.1.12 | cterm 8.0 | borgbackup 8.1.9 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.3 | writecache 8.1.10


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Unfortunately, it isn't possible for an OMV plugin to do that in the OMV web interface. I've looked for solutions but haven't found one. Currently the only two solutions are ssh console (you could use wetty) or portainer. I guess I could add something to the plugin to at least give the command to enter the console from an ssh session.

    Quote

    Via ssh, isn't it just a matter of:

    docker exec paperless_webserver_1 "python3 manage.py


    OR if you need to have the console:

    docker exec -it paperless_webserver_1 bash

    Is there any way of checking and then calling wetty with the above commands , if wetty is installed?

    If not, I think the idea of having a string that could be copied and used once a ssh session has been opened is a good compromise.

    OMV Version 8.latest | AMD Ryzen 5600G with 64GB | JBOD EXT4

    Various Unifi router & switches | Only Linux laptops and PC's

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!