Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageshell
services:
  frontend:
    image: odysseusol/webstudio_frontend:latest
    ports:
      - "4200:80"
    environment:
      NODE_ENV: production
    restart: always
    depends_on:
      - backend

  backend:
    image: odysseusol/webstudio_backend:latest
    ports:
      - "3000:3000"
    environment:
      NODE_ENV: production
      MONGODB_URI: mongodb://database:27017/webstudio
      SECRET_TOKEN: jwtSecretToken
      DOWNLOAD_TOKEN: downloadToken
      PROJECTS_FOLDER: projects
      ACCESS_TOKEN_LIFESPAN: 43200
    restart: always
    depends_on:
      - database
    volumes:
      - backenddata:/home/node/app/projects
      - ./backend/logs:/home/node/app/logs

  database:
    image: mongo
    restart: always
    ports:
      - "27017:27017"
    volumes:
      - mongodbdata:/data/db

  nexmark:
    image: odysseusol/nexmark
    restart: always
    ports:
      - 65440-65443:65440-65443

  standalone01:
    image: odysseusol/odysseus
    stdin_open: true
    restart: always
    ports:
        - 18888:8888
    volumes:
       - ./standalone01:/var/lib/odysseus

volumes:
  mongodbdata:
  backenddata:

Remark: Because this is inside a docker environment you cannot use localhost for nexmark queries → use nexmark instead.

Code Block
languageshell
#PARSER PQL
#RUNQUERY
nexmark:person := ACCESS({source='nexmark:person',
    wrapper='GenericPush',
    transport='TCPClient',
    protocol='SizeByteBuffer',
    dataHandler='Tuple',
    options=[
        ['host', 'nexmark'],
        ['port', '65440'],
        ['ByteOrder', 'LittleEndian']
        ],
    schema=[
        ['timestamp', 'STARTTIMESTAMP'],
        ['id', 'INTEGER'],
        ['name', 'STRING'],
        ['email', 'STRING'],
        ['creditcard', 'STRING'],
        ['city', 'STRING'],
        ['state', 'STRING']
        ]
    })
    
#RUNQUERY
nexmark:bid := ACCESS({source='nexmark:bid',
    wrapper='GenericPush',
    transport='TCPClient',
    protocol='SizeByteBuffer',
    dataHandler='Tuple',
    options=[
        ['host', 'nexmark'],
        ['port', '65442'],
        ['ByteOrder', 'LittleEndian']
        ],
    schema=[
        ['nexmark:bid','timestamp', 'STARTTIMESTAMP'],
        ['nexmark:bid','auction', 'INTEGER'],
        ['nexmark:bid','bidder', 'INTEGER'], 
        ['nexmark:bid','datetime', 'LONG'],
        ['nexmark:bid','price', 'DOUBLE']
        ]
    })

#RUNQUERY    
nexmark:auction := ACCESS({source='nexmark:auction',
    wrapper='GenericPush',
    transport='TCPClient',
    protocol='SizeByteBuffer',
    dataHandler='Tuple',
    options=[
        ['host', 'nexmark'],
        ['port', '65441'],
        ['ByteOrder', 'LittleEndian']
        ],
    schema=[
        ['timestamp', 'STARTTIMESTAMP'],
        ['id', 'INTEGER'],
        ['itemname', 'STRING'],
        ['description', 'STRING'],
        ['initialbid', 'INTEGER'],
        ['reserve', 'INTEGER'],
        ['expires', 'LONG'],
        ['seller', 'INTEGER'],
        ['category', 'INTEGER']
        ]
    })

#RUNQUERY    
nexmark:category := ACCESS({source='nexmark:category',
    wrapper='GenericPush',
    transport='TCPClient',
    protocol='SizeByteBuffer',
    dataHandler='Tuple',
    options=[
        ['host', 'nexmark'],
        ['port', '65443'],
        ['ByteOrder', 'LittleEndian']
        ],
    schema=[
        ['id', 'INTEGER'],
        ['name', 'STRING'],
        ['description', 'STRING'],
        ['parentid', 'INTEGER']
        ]
    })

You connect to a odysseus instance, you will need to use localhost, because the connection is done from the browser that is outside of docker!


Image Added


Content by Label
showLabelsfalse
max5
spacesODYSSEUS
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "ODYSSEUS"
labelskb-how-to-article

...