Posts by DaveOB

    Have you seen this? It explains a lot, I think

    https://wiki.omv-extras.org/do…v7_plugins:docker_compose

    Thanks. This is very helpful.


    So now I think I understand :


    We have :

    Docker Compose

    Files

    Services

    Images

    Containers


    'Files' is used to create a blueprint for the Container - defines the name for the container, what Services / Ports the Container will expose to outside the Container, and what Image is to be used in the Container.


    Images are the apps that will run in the Container, like php web server, Duplicati, Jellyfin, Cloud Commander, etc

    Each Image could be used in multiple Containers.


    Images can be 'Pulled' to get the latest version of the Image.


    Docker Compose uses the 'Files' to create the Containers.

    No current problem as system is running, but I'm struggling to understand how Docker Containers work, in general, and specifically in OMV7.


    Can you please confirm / correct my simplistic understanding for the OMV7 UI :


    The docker container that I have is running a web server with php, and I can edit php scripts in the shared www folder, and run them from my PC when connecting to the Pi IP address & port numbers.

    Everything is running perfectly, but I want to better understand how this works, so I can understand what can cause something to break.


    My ( simplistic ) understanding is that each Docker Container is like a separate VM, each containing it's apps ( like a Webserver with php ), and using the main system resources to run.


    In the OMV UI, I have :


    Services > Compose > Settings.

    This contains details about the Shared Folders that Docker uses for Compose Files, Data, Backup. This I understand.


    Then Services > Compose > Files.

    These files appear to contain info that is used to create the Docker Container, including the Image, Container Name, working Directory, Volumes, Ports.


    What is the difference between Stop & Down.

    What is the purpose of Check, Up, Pull ?


    Then there's Services > Compose > Services.

    I don't understand this part. Is this simply specifying how the outside world can connect to, and interact with, the Container ? A way for someone to connect to the Docker Container using the specified ports ?


    Next is Services > Compose > Images

    Here I have a 'php' image.

    What is the purpose of the 'Pull Image' & 'Pull Image & Tag' buttons ?

    How does this affect the Container ?

    Is this like the apps that are run in the container ?

    Is this simply a list of Images that have been downloaded, and can be 'pulled' to get the latest version of the image ?

    If 'Pull' is used ( assuming it will update the Image ), does the Container need to be recreated or updated somehow ?

    And I am then guessing that this image is referenced in the 'Services > Compose > Files' so the Container, created from the 'Files' has this 'Image' installed as it's OS / app ?


    Lastly, there's Services > Compose > Containers.

    Does not appear to be anything editable here, so I guess these are the Containers that are created using the 'Files' and accessed using the 'Services' and the 'OS' in the Docker Container is the 'Images' ?


    Please keep it simple for an oldie to grasp. My first computer was a Commodore vic 20 with the OS on an audio cassette and 5 kb of RAM.

    Did you upgrade from OMV 6? If you did, look up the fix6to7upgrade script and run it.

    Thank You. Yes, I had previously upgraded from 6 to 7. Just ran the fix6to7upgrade script. No idea if it has changed / fixed anything as currently no updated available on the dashboard.

    Is there a way to tell when the Certificates list was last updated ? If so, I can check back in a few weeks and see if it's updated. Otherwise I just have to wait and see if it breaks again sometime in the future.

    Yes, it does. If you go to the System -> Update Management -> Updates tab and click Check, that is the same as apt update. Clicking the install button will install any updates.

    that's odd.

    I had done the Updates from the Dashboard link and it then listed 'Updates Available : No'.
    It was only after I updated over SSH that it allowed the ftp connection again.

    update :

    well it seems that all I had to do was SSH to the Pi, and run :

    Code
    sudo apt update && sudo apt upgrade


    I assume this updated the OS Certificates list ?

    Question : is this not something that the OMV UI Update should do, or are some updated required to be done using SSH ?

    How to add a certificate ?


    Setup ( please forgive if I use incorrect terms ) :

    Pi 4

    OMV7

    Running Docker Container with Webserver php 8.2-Apache

    on LAN network, and accessible from win 10 PC


    I have some existing php code that I execute using OMV Scheduled Tasks.

    Task of the code is to connect to a remote server, and retrieve a specific file.

    Code has been working flawlessly for over 2 years.


    Today it broke and failed.


    The php code is using CURL to create an ftps connection to the remote server, and then retrieve the required file.


    My first step was to check the connection to the remote server, using Filezilla on my win 10 PC.

    It displayed an 'Unknown Certificate' and detailed the Fingerprint ( SHA-256 ) and Fingerprint (SHA-1).
    Other info displayed : Validity Period, common name, issuer ( Entrust ), Serial.


    When clicking on 'OK' to store and trust the certificate, the connection works again as expected.

    But that's on my win 10 PC.


    So I am guessing that I need to add the Certificate to OMV /Docker ?


    Can a certificate be added to the OMV OS so that it is accessible by all Docker containers, or do I need to add it to the specific Docker Container for the Webserver ?

    What do I need to add the Certificate ? A file from the issuer, or just the Fingerprint ? SHA-256 or SHA-1 ?

    How exactly do I add the certificate ? Somewhere in the OMV7 UI ? Or using SSH to the Pi ?

    Or do I simply need to run something to update the system certificates from the issuer ( Entrust )


    Thank You in advance for any assistance.

    A few clamAV questions.

    After installing the plugin, there's 3 sections under Services > Antivirus


    Settings

    On Access Scans

    Scheduled Scans


    Once Settings is enabled, will that check every new file that gets moved to the NAS ?

    or do I also need to add an 'on access scan' for every one of the Shared Folders on the NAS ?

    Schedules Scans also appears to be on a 'per folder' basis, so should add a Scheduled Scan for each of the shared folders, say once a week ?

    WiFi and LAN not working the same. What am I missing ?


    OMV7 on Pi 4b.
    OS on SD card

    Data on SSD

    LAN connection to Fiber.

    Normal setup is Cron executing php script on SSD.

    Script executes 100% and has been running perfectly for years.


    Lately had some power / fiber connection issues, and want to setup alternate method.


    My Phone has Mobile Data and Hotspot.

    Added the Hotspot details to OMV7 as a WiFi Interface.

    If I unplug the LAN cable from the Pi and turn on the phone Hotspot, the Pi is connected to the phones Hotspot. I can connect / browse from phone to Pi without issues.


    When the cron tries to execute the script ( or if I login to OMV via the phone browser and Run the cron manually ), I am getting an error :


    500 - Internal Server Error

    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/

    usr/local/bin:/usr/local/sbin; export LC ALL-C.UTF-8; export LANGUAGE=;

    export SHELL=/bin/sh; sudo --shell -- non-interactive --user='root'--

    /var/lib/openmediavault/cron.d/use rdefined-5ffefff6-ed53-49e4-

    a638-15a770cb2c84 2>&1' with exit code '1': Could not open input

    file: /var/www/html/xxxgo.php



    The cron also sends a results e-mail to my default mail address saying :

    Code
    Could not open input file: /var/xxx/xxx/xxx/xxgo.php


    If I disable the Hotspot and plug the LAN cable back in to the Pi, it again runs exactly as expected.

    I know I'll get told this isn't the right way, but got tired of wasting time trying to solve it.
    I simply added a scheduled task to restart postfix once an hour.
    Not had an issue with it since. Been about 6 or 7 weeks like this.

    Hi

    I have a Pi4 32bit OS with OMV6 on SD with data on SSD.

    Changing to OMV7 on 64bit


    Used a spare Pi400 to setup OMV7, using new SD card and cloned SSD.

    Got all my setup correct and functioning 100%


    Now want to move the 64bit OS OMV7 SD card from the test Pi400, to my main Pi4


    Pi4 is headless.


    SD in to Pi4, and no IP address appears in the router ARP table.

    Downloaded Angry IP and scanned full IP range and nothing listed.


    Moved the SD card BACK to the Pi400, and shows up perfectly.


    Advice please.

    ryecoaaron - I see this appears to be a common problem you working on.


    Just an observation, in case it hints to the problem/ solution :


    I had my email listed as the sender and the recipient. As soon as I changed the Notifications > Settings > Recipient to my gmail account, all the mails started flowing again.

    Not sure if it's because the sender and recipient was the same, or if the sender and recipient are now completely different services ?


    2c

    - /path/to/custom/php.ini:/usr/local/etc/php/php.ini:ro

    You are awesome as always !


    I put the php.ini file in the same folder as the php-apache.yml file, and used the Absolute Path from the Shared Folders list to add the Volume to the Compose File.


    Tested by making a small change to the php.ini file, Stopped and UP'd the Container, and changes reflected correctly.


    new Compose File :



    Code
    services:
    php-apache:
    image: php:8.2-apache
    container_name: php-webserver
    working_dir: /var/www/html
    volumes:
    - /srv/dev-disk-by-uuid-ab32bc62-5c9c-467c-8348-xxxxxxxx/www/www:/var/www/html
    - /srv/dev-disk-by-uuid-ab32bc62-5c9c-467c-8348-xxxxxxxx/DocCompose/php-apache/php.ini:/usr/local/etc/php/php.ini:ro
    ports:
    - "80:80"

    OMV7 on a Pi4.

    Replacing an OMV6 setup.

    Notification email settings identical between the 2 systems.


    Test mail not coming thru. ( yes, checked spam folders ).

    Notifications from Scheduled Tasks also not sending.


    When System Reboot and system starts up, all emails suddenly come thru ( with their correct time stamp ).


    In fact, I'm now getting DUPLICATE mails that came thru at the time of the last reboot.


    Am I missing a setting ?

    Select the php-apache example.

    OMG !!!!! You make this so simple ! It works and the kettle hasn't even boiled yet !!


    Thank You


    html pages display, and the phpinfo.php displays.


    I assume there's a config or settings page or file somewhere for php ?

    Would that exist only in the docker Container and need to be recreated if the Container is recreated ?


    edit ..


    Been doing some googling, and it appears that php is installed in the new container with the default php.ini file.

    To have a php.ini file that exists outside the Image / Container, a php.ini file could be placed in the Docker Compose folder ( same location as the php-apache.yml file, and have it added to the Image when the image is created in a DockerFile ?

    Does this sound like a viable option ?



    side note : It was previously mentioned to "use a sharedfolder that points to /srv/dev-disk-by-uuid-ab32bc62-5c9c-467c-8348-d53ccd5627e9/www for the data directory on the settings tab of the plugin"
    I was unsure about this, as it would ( I think ) redirect all docker data usage for all docker containers to that 'www' shared folder. So after seeing the great php-apache option working, I removed the container, reset the data directory on the settings tab, and restarted Docket.
    Everything still works, so it appears that the data directory ( listed in the settings tag ) does not have any effect on this Container.