Docker

Yarkon Server comes in a docker optimized image, allowing you to run the server in any docker compatible container.

Basic Setup for Docker

Yarkon Server can be run just like any docker based container, with very few environment variables required. The following is a sample docker-compose that also shows how to pass in the basic env variables required by Yarkon Server:

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:
  server:
    image: "yarkon/server:x.y.z"  # Use the correct tag here
    ports:
      # Map the port of the host to the one used by Yarkon
      - "80:8000"
    environment:
      # When running in AWS, the preferred way to provide AWS API keys to the
      # container is through using an IAM machine role. If this cannot be done,
      # or when running it outside of AWS, you can pass credentials here:
      AWS_ACCESS_KEY_ID: "EXAMPLERFP4S3EXAMPLE"
      AWS_SECRET_ACCESS_KEY: "examplexcRA2gvPBPKAmt95yWIwz/vJIJexample"
      AWS_REGION: "us-east-1"

      # The provider name defaults to AWS, but you can change it to something
      # your users might find more recognizable. In the client, it is displayed
      # above the buckets and in the About form.
      PROVIDER_NAME: "My Company"

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

For a complete guide on how to set up Yarkon Server in docker, check out this document.

Compatible S3 Providers

A common use case for running Yarkon Server in docker is when working in a non-EC2 environment, with an S3 compatible storage. The following example shows the docker-compose file used for Yarkon Server as a front end to Wasabi, but it should be similar for other S3 compatible storage providers.

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:
  server:
    image: "yarkon/server:x.y.z"  # Use the correct tag here
    ports:
      # Map the port of the host to the one used by Yarkon
      - "80:8000"
    environment:
      # If using an S3 compatible provider, these variables should be provided.
      # In this example, showing Wasabi
      PROVIDER_END_POINT: "https://s3.wasabisys.com"
      PROVIDER_STS_END_POINT: "https://iam.wasabisys.com"   # Will default to PROVIDER_END_POINT if not specified
      PROVIDER_IAM_END_POINT: "https://iam.wasabisys.com"   # Will default to PROVIDER_END_POINT if not specified
      PROVIDER_NAME: "Wasabi"
      PROVIDER_IMAGE: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMzciIGhlaWdodD0iMTM2IiB2aWV3Qm94PSIwIDAgMTM3IDEzNiI+CiAgPHBhdGggZmlsbD0iIzAzQzczNiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAwLjc3NjQsMTEzLjMzNSBMMTAwLjc3NjQsOTUuNzUzIEwxMTAuNDY5NCwxMDQuNTQxIEMxMDcuNTk1NCwxMDcuODM1IDEwNC4zNDI0LDExMC43OSAxMDAuNzc2NCwxMTMuMzM1IEwxMDAuNzc2NCwxMTMuMzM1IFogTTYwLjE1NzQsMTIzLjAzMiBMODguNTk3NCw5Ni4xNDggTDg4LjU5NzQsMTE5LjkxMSBDODIuMzY1NCwxMjIuMzMgNzUuNTk0NCwxMjMuNjYgNjguNTE4NCwxMjMuNjYgQzY1LjY3NjQsMTIzLjY2IDYyLjg4NTQsMTIzLjQ0NSA2MC4xNTc0LDEyMy4wMzIgTDYwLjE1NzQsMTIzLjAzMiBaIE0xMy4xNjM0LDczLjg0IEw0My4wNDU0LDEwMC42MzcgTDczLjA4NzQsNzIuNDI1IEw4OC41OTc0LDU3Ljc2NCBMODguNTk3NCw3OS4zODkgTDQ2LjU0OTQsMTE5LjEzNyBDMjguNDU3NCwxMTEuMzM1IDE1LjI5NzQsOTQuMjA2IDEzLjE2MzQsNzMuODQgTDEzLjE2MzQsNzMuODQgWiBNMzYuNzg4NCwyMi4yOTYgTDM2LjgwNzQsMzku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TQsNDkuODc5IDAuNjc5NCw2OCBDMC42Nzk0LDg2LjEyMSA3LjczNTQsMTAzLjE1NyAyMC41NDg0LDExNS45NyBDMzMuMzYxNCwxMjguNzgzIDUwLjM5NzQsMTM1LjgzOSA2OC41MTg0LDEzNS44MzkgQzg2LjYzODQsMTM1LjgzOSAxMDMuNjc0NCwxMjguNzgzIDExNi40ODc0LDExNS45NyBDMTI5LjMwMDQsMTAzLjE1NyAxMzYuMzU3NCw4Ni4xMjEgMTM2LjM1NzQsNjggQzEzNi4zNTc0LDQ5Ljg3OSAxMjkuMzAwNCwzMi44NDMgMTE2LjQ4NzQsMjAuMDMgTDExNi40ODc0LDIwLjAzIFoiLz4KPC9zdmc+Cg=="

      # Sample Wasabi credentials
      AWS_ACCESS_KEY_ID: "EXAMPLE30JHVFEXAMPLE"
      AWS_SECRET_ACCESS_KEY: "exampleMfEP1yElpH9kWEUmSVdbDcyl5Wexample"
      AWS_REGION: "us-east-1"

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