Example on how to configure Marugoto and Marugoto Frontend - uzh/marugoto GitHub Wiki

there are 3 components; arrangodb database for storing games and state (password is generated on start of the container/db). marugoto middleware (https://github.com/uzh/marugoto), which offers the game api. marugoto frontend (https://github.com/uzh/marugoto-frontend), which offers the user interface for games. When creating a new game, you create the layout as described in the example (in json), and you then use 'marugoto-shell' to import the games via the middleware (https://github.com/uzh/marugoto/wiki/Content-Importer-Concept). You should run the imported on the frontend server (easiest is if all services run on 1 machine), because images and videos will be placed on the frontend, not in the DB. On the frontend you need to make sure that it points to the correct URL of the middleware (it's in the .env file in the marugoto-frontend repo). Users can then sign-in and play the game.

Some guides on the middleware: https://github.com/uzh/marugoto/wiki

.env example in marugoto-frontend (VUE_APP_API_PATH should point to where the middleware is hosted and probably needs to be publically accesable, VUE_APP_BASE_PATH is the URL of the frontend):

VUE_APP_API_PATH=https://marugoto.demo.com/api/
VUE_APP_BASE_PATH=https://marugoto.demo.com/
VUE_APP_LOCAL_PATH=https://marugoto.demo.com/
VUE_APP_RESOURCES_PATH=https://marugoto.demo.com/resources/
VUE_APP_TITLE=Lives in Transit - DEMO
VUE_APP_V=0.3.4
VUE_APP_ENABLE_SHIB=false

If you're using docker, a compose file might look as follows:

version: '3'
services:
  database:
    image: "arangodb:3.3"
    volumes:
    - /db:/var/lib/arangodb3
    ports:
    - 8529:8529
    environment:
    - ARANGO_ROOT_PASSWORD=<some password>

  backend:
    image: "uzhlit/marugoto:1.0.8"
    volumes:
    - "~/application.properties:/usr/local/tomcat/conf/application-production.properties"
    - "/resources:/resources"
    environment:
    - JAVA_OPTS="-Dspring.config.location=file:/usr/local/tomcat/conf/application-production.properties"
    ports:
    - 8888:8080

  web:
    image: "local/marugoto-frontend:dev"
    volumes:
    - "/resources:/usr/share/nginx/html/resources"
    ports:
    - 8080:80

An example of the properties file for middleware/shell (application-production.properties):

spring.profiles.active=production

[email protected]@
marugoto.resource.dir=/resources
marugoto.resource.temp.dir=/tmp/
marugoto.resource.static.dir=/resources

marugoto.database=dev
marugoto.fromMail=marugoto@<your domain>

arangodb.host=<arrango host>
arangodb.port=8529
arangodb.user=root
arangodb.password=<your arrango password>

spring.jackson.default-property-inclusion=non_null

shell.argument.for.doImport.path=
shell.argument.for.doImport.importerId=
shell.argument.for.doImport.delete.playerState=

smtp.host=smtp.<your domain>
smtp.port=25
smtp.username=noreply@<your domain>
smtp.password=xxxx

# Max file size.
spring.servlet.multipart.max-file-size=20MB
# Max Request Size
spring.servlet.multipart.max-request-size=25MB

You can run the shell command as follows: docker run -i --network <the network created by docker compose> -v <path to the content to import on local fs>:/content -v <local folder where resources are stored>:/resources -v <path to application.properties>:/etc/application-production.properties uzhlit/marugoto-shell