The web service server for both VicRun's game and website
Ruby HTML JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
public
test
vendor/assets
.gitignore
Dockerfile
Gemfile
Gemfile.lock
README.md
README.rdoc
Rakefile
config.ru
docker-compose.yml

README.md

vicrun-server

The web service server for VicRun. It does:

  • Maintain dataset (Water quality)
  • Store players' account
  • Store players' progress

Getting Started

1. Setup Docker

Install Docker for your machine. It will install:

  • Oracle VM VirtualBox: The virtual machine to run Docker
  • Docker Quickstart Terminal: The terminal to run docker's commands
  • Kitematic: GUI to manage containers

2. Clone project

  • Open Docker Quickstart Terminal. Wait until the terminal is ready.
  • Clone the project by typing git clone https://github.com/Team-ExperT/vicrun-server.git
  • Change to the folder by typing cd vicrun-server
  • Build Docker's containers by typing docker-compose build. It takes a while.
  • Start the containers by typing docker-compose up
  • Open Kitematic and you will see vicrunserver_db_1 and vicrunserver_web_1 are running.
  • Close the Docker Quickstart Terminal window.

3. Prepare database

  • Open Docker Quickstart Terminal.
  • Make sure container vicrunserver_db_1 and vicrunserver_web_1 are running.
  • Go to project's folder by typing cd ~/vicrun-server
  • Create database, tables and import dataset by typing docker exec vicrunserver_web_1 rake db:setup db:seed
  • Make sure no error message is arised.

4. Run the server

  • If container vicrunserver_db_1 and vicrunserver_web_1 are not running, you can start it from Kitematic or simply do docker-compose up on the project's folder.
  • If you are with Windows machine, open Virtualbox > click Settings for default > go to Network > click Port Forwarding > click little plus button on the right > put 5780 for Host Port and Guest Port > OK
  • Now the webservice is accessible at http://localhost:5780