This is a web-based version of Robert and Jonas Gifford's "FISH", a fish banks simulator for environmental psychology studies.
More information on the original FISH here: http://web.uvic.ca/~rgifford/fish/
Please ensure these requirements are installed before proceeding to the Installation section.
gem install sass
)npm install
(install dependencies specified in the package.json file)
sudo npm install
instead.npm start
(on Windows or OSX) or nodejs app.js
on Linux to start the server.These are located in the developer_scripts folder
npm run populatedb
Run post-install.
npm run cleandb
This will clean all the collections defined in the file (experimenters, microworlds, and sessions)npm run resetdb
runs cleandb then populatedbnpm run devreset
runs cleandb then populate db and then starts up the server.npm run sass
watches for style changesThis project is also dockerized (no official repository available however). This project uses and tested on the following Docker technologies:
The node application is run in a container named fish
and the MongoDB is run in a container
named mongo-fish
. See docker-compose.yml
for more details.
The following volumes are bound from host
to the Docker container
fish
to /fish/app
mongo-fish
to /logs/mongo.log
You can see more details on Docer setup
The following is a diagram of the Docker setup:
From the above diagram you can infer several things:
http://localhost:8080
from your browser/logs/mongo.log
is mounted to mongo.log
, you may see all the mongo logs being saved
to mongo.log
so you can check it out in the futureBefore trying to run Dockerized application, please run npm run build-docker
first beforehand.
This command only needs to be run once, unless you want to rebuild the containers due to changes.
Several possible changes that needs rebuilding:
Dockerfile-app
or Dockerfile-Db
In order to use the Dockerized version do the following
npm run start-docker
(standard mode)npm run start-daemon-docker
(daemon mode a.k.a Docker detached mode)npm run docker-populatedb
. It's
the populate DB setup but for the docker setupIf you run in daemon mode then you can do npm run stop-daemon-docker
to stop daemon mode
If Docker was run in non-detached mode then logs will be visible on console stdout.
The node application and MongoDB logs may also be found in fish.log
and mongo.log
respectively.
If Docker was run in detached mode you may see logs by running the following commands:
npm run logs-docker-fish
npm run logs-docker-mongo-fish
Navigate to http://localhost:8080/admin
Log in with the following credentials:
Admin
123456789
You now have access to the microworlds
Create and activate a microworld if you wish to run an experiment with users
Note: Look at the Code for the experiment on an active microworld. eg Active Microworld: QQ5HQP