Yarkon Docker with Min.io

Yarkon versions 7+

Prepare min.io

For the purpose of this guide, we assume that you are familiar with min.io and already have it running. To simulate this situation, we followed this guide to set up a demo min.io server, running locally, using docker.

The following command will run a conainerized min.io server with its data persisted to the folder .minio/data in your home folder. If you are using Windows, use the appropriate path syntax instead.

$ docker run -p 9000:9000 -p 9001:9001 -v /Users/$USER/.minio/data:/data  quay.io/minio/minio server /data --console-address ":9001"

MinIO Object Storage Server
Copyright: 2015-2024 MinIO, Inc.
License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html
Version: RELEASE.2024-12-18T13-15-44Z (go1.23.4 linux/amd64)

API: http://172.17.0.3:9000  http://127.0.0.1:9000
WebUI: http://172.17.0.3:9001 http://127.0.0.1:9001

Docs: https://docs.min.io
WARN: Detected default credentials 'minioadmin:minioadmin', we recommend that you change these values with 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment variables

When min.io server starts, it will publish the end points it is listening on (which we have mapped from the container to the host), and will warn about us using the default credentials. For this demo, we can ignore this warning.

Browse to Log in to the min.io Web UI - as stated by min.io when it started, it is available from http://127.0.0.1:9001 - and create a couple of buckets. We named ours yarkon-bucket-1 and yarkon-bucket-2.

Buckets

Access Key

Follow the instructions provided by min.io to get the API Access Key. Keep it for the next step in the set up.

Docker Setup

Use the following docker compose configuration to run Yarkon Docker with min.io. Note that we run both Yarkon and min.io as docker containers, with Yarkon being dependent on min.io. If you named your docker-compose file docker-compose.minio.yml, you run it using the command $ docker compose --file docker-compose.minio.yml up, just make sure to stop any other running instance of min.io that might be using the same port.

version: "3.2"

    # We use "xyz" to denote the version number used. For instance, if you are using
    # yarkon version 4.5.1, "xyz" would be "451". You can use another naming convention
    # if you prefer. Explicitely definding the version number in the image tag and
    # volumes ensures that upgrades can be done sequentially and you can always restore
    # to a previous version.

services:
  minio:
    image: "quay.io/minio/minio"
    ports:
      - "9000:9000" # Min.io API
      - "9001:9001" # Min.io UI
    platform: linux/amd64
    volumes:
      # For this sample, create the minio data folder under your home directory
      - ~/.minio/data:/data
    command: server /data --console-address ":9001"

  server:
    image: "yarkon/server:x.y.z"  # Use the correct tag here (or latest)
    depends_on:
      - minio
    ports:
      # Map the port of the host to the one used by Yarkon
      - "80:8000"
    platform: linux/amd64
    environment:
      # Access minio over the network created by docker compose
      PROVIDER_END_POINT: "http://minio:9000" # Match the API end point
      PROVIDER_NAME: "Minio"
      PROVIDER_IMAGE: "https://dl.min.io/logo/Minio_logo_light/Minio_logo_light.png"
      S3_STORAGE: "true" # Make sure this is set

      # Sample Minio credentials
      AWS_ACCESS_KEY_ID: "EXAMPLE30JHVFEXAMPLE"
      AWS_SECRET_ACCESS_KEY: "exampleMfEP1yElpH9kWEUmSVdbDcyl5Wexample"

    volumes:
      - dbdata:/var/app/current/database
      - license:/var/app/current/.lic
      - yarkon:/var/app/current/public/yarkon
      - /var/log:/var/app/current/log # Map the /var/log folder on the host to the log folder
volumes:
  dbdata:
  license:
  yarkon:

If all works as it should, you should see the following output from docker:

$ docker compose --file docker-compose.minio.yml up

[+] Running 2/2
 ✔ Container storage-minio-1   Created                                                                                                                                                                      0.0s
 ✔ Container storage-server-1  Recreated                                                                                                                                                                    0.1s
Attaching to minio-1, server-1
minio-1   | MinIO Object Storage Server
minio-1   | Copyright: 2015-2024 MinIO, Inc.
minio-1   | License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html
minio-1   | Version: RELEASE.2024-12-18T13-15-44Z (go1.23.4 linux/amd64)
minio-1   |
minio-1   | API: http://172.19.0.2:9000  http://127.0.0.1:9000
minio-1   | WebUI: http://172.19.0.2:9001 http://127.0.0.1:9001
minio-1   |
minio-1   | Docs: https://docs.min.io
minio-1   | WARN: Detected default credentials 'minioadmin:minioadmin', we recommend that you change these values with 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment variables
server-1  | 2024-12-27T00:58:10: PM2 log: Launching in no daemon mode
server-1  | 2024-12-27T00:58:10: PM2 log: App [Yarkon Admin Console:0] starting in -fork mode-
server-1  | 2024-12-27T00:58:10: PM2 log: App [Yarkon Admin Console:0] online
server-1  | [00:58:12] INFO Connecting to sqlite DB: database/aphek.db:aphek
server-1  | [00:58:12] INFO
server-1  | [00:58:12] INFO   ,-------------------------------------------------------------------.
server-1  | [00:58:12] INFO   |                                                                   |
server-1  | [00:58:12] INFO   |                                                                   |
server-1  | [00:58:12] INFO   |     ##    ##    ###    ########  ##    ##  #######  ##    ##      |
server-1  | [00:58:12] INFO   |      ##  ##    ## ##   ##     ## ##   ##  ##     ## ###   ##      |
server-1  | [00:58:12] INFO   |       ####    ##   ##  ##     ## ##  ##   ##     ## ####  ##      |
server-1  | [00:58:12] INFO   |        ##    ##     ## ########  #####    ##     ## ## ## ##      |
server-1  | [00:58:12] INFO   |        ##    ######### ##   ##   ##  ##   ##     ## ##  ####      |
server-1  | [00:58:12] INFO   |        ##    ##     ## ##    ##  ##   ##  ##     ## ##   ###      |
server-1  | [00:58:12] INFO   |        ##    ##     ## ##     ## ##    ##  #######  ##    ##      |
server-1  | [00:58:12] INFO   |                                                                   |
server-1  | [00:58:12] INFO   |                                                 Yarkon Server     |
server-1  | [00:58:12] INFO   |                                     Enterprise Edition v7.0.1     |
server-1  | [00:58:12] INFO   |                                                                   |
server-1  | [00:58:12] INFO   |     Environment: production (packaged, docker)                    |
server-1  | [00:58:12] INFO   |     Port: 8000                                                    |
server-1  | [00:58:12] INFO   |     Server: /console                                              |
server-1  | [00:58:12] INFO   |     Client: /                                                     |
server-1  | [00:58:12] INFO   |     Database: database/aphek.db:aphek                             |
server-1  | [00:58:12] INFO   |     Log path: ./log/                                              |
server-1  | [00:58:12] INFO   |     Provider: Minio http://minio:9000 (S3 Storage)                |
server-1  | [00:58:12] INFO   |                                                                   |
server-1  | [00:58:12] INFO   |                                                                   |
server-1  | [00:58:12] INFO   `-------------------------------------------------------------------'
server-1  | [00:58:12] INFO
server-1  | [00:58:12] INFO Initializing session using sequelize (db backed) store.
server-1  | [00:58:13] INFO [HPM] Proxy created: /  ->  http://minio:9000
server-1  | [00:58:13] INFO Initializing application
server-1  | [00:58:13] INFO Database is sqlite, ready
server-1  | [00:58:13] INFO Using key-file license provider
server-1  | [00:58:13] INFO Initializing key-file licensing
server-1  | [00:58:13] INFO Attaching license to device 02:42:ac:13:00:03
server-1  | [00:58:13] INFO Verifying license for instance 02:42:ac:13:00:03 and company 1
server-1  | [00:58:13] INFO Getting details of license file for company 1
server-1  | [00:58:16] INFO Initializing licensing scheduler
server-1  | [00:58:16] INFO Initialization done. Starting server.

Since we mapped Yarkon's port to port 80 on the host, you can now use your dockerized Yarkon server by browsing to http://localhost. If this is the first time you run Yarkon, it will enter the setup workflow. Otherwise, the client interface would be shown. You can always access the administrator console using http://localhost/console.

At this point, you have a fully operational Yarkon server backed by a min.io storage provider.

Open the Buckets tab to verify that the two buckets previously created in min.io are visible. Then see that the security model is set to Managed and that the provider page shows the details from the docker-compose file.

Buckets
Security Model
Provider

Features

As mentioned before, some of the features available to users of AWS S3, might not be available when using other storage providers. Use the Features page of the Yarkon Admin Console to turn off features that are not supported.

Features