GithubHelp home page GithubHelp logo

nstouls / plateformepc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aclaude1/plateformepc

0.0 2.0 1.0 13.69 MB

Plateforme permettant une correction automatique d'exercices d'informatiques. A destination du PC de l'INSA de Lyon

Java 4.93% HTML 8.79% CSS 3.02% JavaScript 80.83% Batchfile 0.23% TeX 1.77% Dockerfile 0.31% Shell 0.14%

plateformepc's Introduction

plateformePC

This version of the tool is modified to be installed on a RaspberryPI 2.

Installation

  • Install Debian, Docker, MongoDB and OpenJDK
    curl -sSL https://get.docker.com/ | sh
    sudo usermod -aG docker pi
    sudo apt-get install openjdk-8-jdk git
    sudo apt-get upgrade
    docker pull descol/rpi-mongo
  • Configure classpath :
    echo "export JAVA_HOME=/usr/lib/jvm/default-java/" >> ~/.bashrc
  • Deploy this tool:
    Clone this git
    cd base-plateforme
    docker build -t descol/base-plateforme .

Starting platform

Running mongoDB and Vertex-based web server:

    docker run -d --name plateformeDB -v /home/pi/plateformePC/DB:/data/db -p 27017:27017 descol/rpi-mongo
    docker start plateformeDB
    sudo java -jar build/libs/Plateforme-fat.jar

If Plateforme-fat.jar doesnt exist, it could be generated from the gradle script on a desktop computer :

    ./gradlew shadowJar

Background Running

Manual method

  • Install screen utility :
    sudo apt-get update
    sudo apt-get install screen
  • Launch the platform through screen :
    screen sudo java -jar build/libs/Plateforme-fat.jar

Automatic launch at startup

Add a link in systemd pointing out to the rpi-platefromePC service:

    sudo ln -s /home/pi/plateformePC/scripts/rpi-plateformePC.service /etc/systemd/system/rpi-plateformePC.service 

Troubleshooting

  • To revert MongoDB from a crash :
    docker run --rm --volumes-from plateformeDB descol/rpi-mongo unlink "/mongodb/data/mongod.lock"
    docker run --rm -it -p 27017:27017  --volumes-from plateformeDB descol/rpi-mongo mongod --dbpath /mongodb/data/ --repair
    docker start plateformeDB

plateformepc's People

Contributors

nstouls avatar ocrozo avatar yolosesk avatar

Watchers

 avatar  avatar

Forkers

ocrozo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.