Skip to content

PUC-DISCIPLINAS/election-java-rmi-GaMoCh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Election

Author

Gabriel Moreira Chaves

Requirements

  • Java Development Kit 8 (JDK 8) or Docker

Client commands

  • vote <candidateId>: Used to vote for the candidate
  • result <candidateId>: Used to see the candidate's number of votes
  • exit: Used to exit the system

Run with javac/java

Compile code

javac -d bin -sourcepath src src/*.java src/**/*.java

Run a server service

java -cp bin Server

Run a client service

java -cp bin Client

Run with Docker

Authenticate to GitHub Packages

echo <READ_PACKAGES_TOKEN> | docker login docker.pkg.github.com -u <USERNAME> --password-stdin

Pull Docker image

docker pull docker.pkg.github.com/puc-disciplinas/election-java-rmi-gamoch/election

Rename Docker image

docker tag docker.pkg.github.com/puc-disciplinas/election-java-rmi-gamoch/election election

Run a server service

docker run -it --rm --net host -v election-data:/data election Server

Run a client service

docker run -it --rm --net host election Client