PART 3: Install FileRun Docker Cloud service to MariaDB

  • PART 3: Adding FileRun Docker Cloud Service to existing MariaDB Docker Container

    As follow up to the previous guide on how to install Nextcloud Service with MariaDB Docker database, in Part 3 we extend the
    use of the MariaDB Container created in Part 1 for use with another cloud server service - namely FileRun.
    FileRun is a competitor to Nextcloud and install in almost the same manner.

    What you will need (pre-requisites):

    - Access to OMV SSH Shell (using your favourite method - Terminal, Putty, Shellinabox, etc)
    - Docker custom network already running (one simple terminal command)
    - MariaDB Container already setup and running

    Summary of steps

    Step 1. Prepare Docker environment setup for FileRun Docker Container
    Step 2. Create FileRun MySQL User and Database in the existing MariaDB Container
    Step 3. Install FIleRun Docker
    Step 4. Setup FIleRun service

    STEP 1

    First create folders which the Filerun Container will access on your OMV file system.
    FIlerun Container requires TWO folders on the Host OS (e.g. in /sharedfolders) :
    one for the config files and second one to store your actual Cloud data.

    Login into terminal and enter the following command:

    mkdir /sharedfolders/docker/filerun
    mkdir /sharedfolders/docker/filerun/html
    mkdir /sharedfolders/docker/filerun/my-data

    The /sharedfolders/docker/filerun will map to /var/www/html within the Filerun container.
    The /sharedfolders/docker/filerun/my-data will map to /user-files within the Filerun container.

    Effectively, my-data folder will be your Cloud folder that will be presented in the Filerun web-gui.

    STEP 2

    Create Filerun MySQL User and Database within the existing MariaDB Container.

    Filerun Container expects that the MySQL database to be pre-prepared before it is run so we have to manually set it up.
    This is easy since we already have a running MariaDB Container (from Part 1).

    First Shell into the MariaDB Container

    docker exec -it mariadb bash

    Now enter the MariaDB Server (and enter the password when prompted):

    mysql -u root -p

    Next, create a User ID ('filerun') & password ('filerun') for the Filerun database ('filerun') and the database itself:

    create user 'filerun' identified by 'filerun';
    create database if not exists filerun;
    grant all privileges on filerun.* to 'filerun' identified by 'filerun';
    flush privileges;

    STEP 3

    With the Host folders setup and the Filerun database & User setup, we can now configure the Filerun Container and run it.

    On the OMV GUI, click the Docker icon in the Services menu.
    In the search box enter afian/filerun and once found, select it.
    In the pop-up box, click Start and once completed, click Close.

    Screenshot 2019-03-25 at 19.49.57.png
    At this stage we have downloaded a Docker Image for Filerun.

    Next, Instantiate the Filerun Container (to start the Service), select this docker image and click on Run Image button.
    The Container configuration screen will pop-up.

    Enter a name in the Container name box (I called mine filerun).
    Select 'Always' for the Restart Policy (restarts the Container on reboot).

    Screenshot 2019-03-24 at 23.01.40.png

    In the Networking section set the Networking mode to Bridge (should be default)

    In the Port Forwarding section, need to setup the Host IP addresses:

    Host IP = (should be default already)
    Host Port = 8087 (this will route any access on OMV's IP address on port 8087 to Filerun's web server on port 80)
    Exposed Port = 80/tcp (Filerun's port 80)
    Click "+" to save the entry (do not forget to do this)

    Note: For the Host Port address, choose a number that is not already used by another service on your system.

    In the Environment variables section, we need to change some of the pre-defined variables:

    FR_DB_HOST = mariadb
    APACHE_RUN_USER = www-data
    APACHE_RUN_GROUP = www-data

    Screenshot 2019-03-24 at 23.06.40.png

    Remember to click tick for each edit.

    Under Volumes and Bind mounts section, enter the path of the Host Path of the folders created in Step 1:

    Host Path = /sharedfolders/docker/filerun
    Container Path = /var/www/html
    Click "+" button to add the path

    Host Path = /sharedfolders/docker/filerun/my-data
    Container Path = /user-files
    Click "+" button to add the path
    Screenshot 2019-03-24 at 23.22.54.png

    In the Extra arguments section, enter the name of the Docker Network that was created in [b]Part 1:

    --network my-docker-net
    Screenshot 2019-03-24 at 23.08.01.png

    This is the docker network name on which the MariaDB Container is also running.

    Finally, click Save to actually start the Filerun Container which will configure itself using the configuration data &
    environment variables you provided above. This will take a while so wait for several minutes so be patient.

    STEP 4

    In your browser enter http: //your-OMV-IP-ADDRESS:8087

    You will see the Filerun Home page with login prompt
    Screenshot 2019-03-24 at 23.34.55.png
    The default Username = superuser
    The default Password = superuser

    Login and you will be asked to change the password.

    As it stands, the Filerun service is secure on your on internal network but not for the public internet.
    For that you need to add and encryption service and a reverse proxy. See Letsencrypt Docker.

    NOTE: After the Filerun Container starts, it will change the ownership of the Host Folder. E.g.:

    root@OMV-Revo:~# ls -l /sharedfolders/docker/filerun
    total 12
    drwxrwsr-x 18 www-data www-data 4096 Mar 23 23:33 html
    drwxr-sr-x  7 www-data www-data 4096 Mar 24 17:45 my-data

    HP Microserver N40L; OMV 4.1.18-2;

    Edited once, last by macnb ().

Participate now!

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