S3 Minio (Optional)

Introduction

S3 Minio - The scalable solution for object-based storage. With high performance and flexibility, it is ideal for modern data applications. When using Relution, it is possible that the table ‘resource’ becomes relatively large. Among other things, native apps are stored here.

Depending on the size, it makes sense to swap out these apps from the database. An S3 bucket is suitable for outsourcing app files. The Minio Image is a small, easy-to-configure Docker Container.

Configuration of the .yml

The Minio Container must be added to the docker-compose.yml.

Add this section:

services:
  minio:
    image: "quay.io/minio/minio:latest"
    restart: always
    ports:
      - "9001:9001"
    expose:
      - 9000
    environment:
      - MINIO_ROOT_USER=%USERNAME%
      - MINIO_ROOT_PASSWORD=%PASSWORD%
    command: server --console-address ":9001" /data
    networks:
      relution-network:
        aliases:
          - minio
    volumes:
      - ./volumes/minio/data:/data

In this configuration, Minio stores all data on the local hard disk under ./volumes/minio/data. The parameters MINIO_ROOT_USER and MINIO_ROOT_PASSWORD must be adapted.

The permissions for the folder must still be adapted before starting and migrating the data.

Relution must then be informed that the rescource table no longer holds the data and replaced byS3 Bucket.

You also need to use the generated access key id and secret key to configure STORAGE_S3_ACCESS_KEY and STORAGE_S3_SECRET_KEY.

To do this, add this section to docker-compose.yml:

services:
  relution:
    environment:
      - S3_ENDPOINT=http://minio:9000
      - STORAGE_TYPE=S3
      - STORAGE_S3_ACCESS_KEY=%USERNAME%
      - STORAGE_S3_SECRET_KEY=%PASSWORD%
      - STORAGE_S3_BUCKET_NAME=relution

You can also configre this via application.yml:

relution:
  storage:
    resourceStorageType: S3
    s3:
      customEndpoint: http://minio:9000
      accessKey: %ACCES-KEY-ID%
      secretKey: %SECRET-KEY%
      bucketName: relution

Then execute the command docker compose pull and the Minio image will be downloaded. Then start the containers with docker compose up -d. Minio will be up and running in a few seconds and Relution will start copying all the contents of the resource table into the S3 bucket.

The process can be monitored with the following command:

docker logs -f docker_relution