-
Notifications
You must be signed in to change notification settings - Fork 12
Setup
Available setup:
- standalone
- docker
- jdk11(tested Java 11.0.5)
- mongodb v2.6+ (tested on version 5.0.5)
- git client
- Apache maven 3+ (tested on 3.3.x)
- Node js (v 14.15.0)
- Clone the sources:
git clone https://github.com/smartcommunitylab/smartcampus.gamification.git - build core with Apache Maven (from the smartcampus.gamification/game-engine.core):
mvn install - build web app with Apache Maven (from the smartcampus.gamification/game-engine.web):
mvn package
This will produce the ready-to-use executable jar with embedded web server (in the game-engine.web/target folder). The default configuration of the back end engine core is defined inside 'engine.core.properties'(smartcampus.gamification/game-engine.core/src/main/resources) while the configuration of web application is defined inside application.yml(smartcampus.gamification/game-engine.web/src/main/resources) file. The default configuration can be overriden with custom launch configuration (eclipse or command line) as shown in figure below

- build React-Admin front end Gamification console with NPM package manager (from the smartcampus.gamification/gamification-frontend):
npm i
Run the backend server.
java -jar target\game-engine.web.jar --spring.profiles.active=sec --MONGO_DBNAME=gamification-engine --SPRING_DATA_MONGODB_URL=mongodb://localhost:27017/gamification-engine
Run the front end console by running (from the smartcampus.gamification/gamification-frontend):
npm start
the command will launch the administration console
Read the tutorial to learn how to use console here.
- docker > 1.18
- docker-compose > 1.25.0
You can find configurations into gamification.env.
- Copy
run-configs/users.ymlwhere you want (ex:/your-path/users.yml) - Open
/your-path/users.ymland modifyusernameandpassword - In
gamification.envmodifySPRING_PROFILEtosec - In
gamification.envmodifyUSERS_FILEto/app/config/users.yml - In
docker-compose.ymlmodifyvolumesas:
volumes:
- ./logs:/app/game-engine.web/logs
- /your-path:/app/config
- run
sudo COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose upfrom the root folder.
NOTE
- gamification-engine will be up and running on host port 8010
- administration console is available at url http://localhost:3000/#game
- APIs can be invoked using the url prefix http://localhost:8010/gamification
- APIs are protected with the user you put in file
users.yml - mongodb container exposes to host port 50000 to inspect the data inside
- gamification-engine exposes a JMX connection on host port 7777