Search code examples
docker-composeravendb

How to add the server license for reavenDB with docker composer


Some how it's not clear how to add the server license for ravenDB in a docker compose file.

Docker compose

version: "3.9"
services:
  raven1:
    container_name: raven1
    image: ravendb/ravendb
    ports:
      - 8091:8080
      - 38888:38888
    environment:
      - RAVEN_Setup_Mode=None
      - RAVEN_License_Eula_Accepted=true
      - RAVEN_Security_UnsecuredAccessAllowed=PrivateNetwork
      - RAVEN_License_Path=/Users/********/projects/RavenDB/license.json
    volumes:
      - /Users/********/projects/RavenDB/Data:/opt/RavenDB/Server/RavenData

license.json

{
    "Id": "da9446f7-ad2e-4267-ae62-47ff2f34bc86",
    "Name": "Swisscom",
    "Keys": [
        ...
    ]
}

The license is not added. What is the correct way to add this server license.

enter image description here


Solution

  • the variable RAVEN_License_Path shows the license path inside the docker. So it should be

    RAVEN_License_Path=/opt/RavenDB/Server/RavenLicense/license.json
    

    and add this volume

    - /Users/********/projects/RavenLicense:/opt/RavenDB/Server/RavenLicense