Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
David Campos committed Mar 30, 2017
2 parents c78394f + 6ca6ada commit 1ce2594
Show file tree
Hide file tree
Showing 17 changed files with 473 additions and 48 deletions.
31 changes: 31 additions & 0 deletions docker/Dockerfile
@@ -0,0 +1,31 @@
############################################################
# Dockerfile to build Neji Webservices
# Based on airdock/oracle-jdk:1.7
############################################################

# Set the base image to Ubuntu
FROM lwieske/java-8:jdk-8u77
MAINTAINER David Campos

# Update and install unzip
RUN yum install -y unzip

# Install
ADD neji-server.zip /opt/neji-server.zip
WORKDIR /opt
RUN unzip neji-server.zip
RUN ls /opt
RUN rm -rf neji-server.zip
RUN chmod u+x neji-server/neji-server.sh

# Setup symbolic links for persistent data
RUN ln -s /opt/neji-resources /opt/neji-server/resources

# Expose the default port
EXPOSE 8017

# Add run.sh to Docker
ADD ./run.sh /opt/run.sh

# Set default container command
ENTRYPOINT ["/opt/run.sh"]
4 changes: 4 additions & 0 deletions docker/run.sh
@@ -0,0 +1,4 @@
#!/bin/bash

cd /opt/neji-server/
./neji-server.sh -port 8017
11 changes: 11 additions & 0 deletions docker/update.sh
@@ -0,0 +1,11 @@
#!/bin/bash

docker stop neji-webservices

docker rm neji-webservices

docker rmi -f neji-webservices

docker build --force-rm=true --no-cache=true -t neji-webservices .

docker run -d -p 8017:8017 --name neji-webservices -v /opt/neji-resources:/opt/neji-resources neji-webservices /bin/bash
2 changes: 1 addition & 1 deletion evaluate.sh
@@ -1,5 +1,5 @@
#!/bin/bash
cp=target/neji-2.0.0-jar-with-dependencies.jar:$CLASSPATH
cp=target/neji-2.1.0-SNAPSHOT-jar-with-dependencies.jar:$CLASSPATH
MEMORY=8G
JAVA_COMMAND="java -Xmx$MEMORY -Dfile.encoding=UTF-8 -classpath $cp"
CLASS=pt.ua.tm.neji.evaluation.EvaluateMain
Expand Down
4 changes: 2 additions & 2 deletions neji.bat
@@ -1,7 +1,7 @@
@echo off

set cp=target\neji-2.0.0-jar-with-dependencies.jar
set memory=2048m
set cp=target\neji-2.1.0-SNAPSHOT-jar-with-dependencies.jar
set memory=6144m
set encoding=UTF-8
set class=pt.ua.tm.neji.cli.Main

Expand Down
4 changes: 2 additions & 2 deletions neji.sh
@@ -1,6 +1,6 @@
#!/bin/bash
cp=target/neji-2.0.0-jar-with-dependencies.jar:$CLASSPATH
MEMORY=8G
cp=target/neji-2.1.0-SNAPSHOT-jar-with-dependencies.jar:$CLASSPATH
MEMORY=6G
JAVA_COMMAND="java -Xmx$MEMORY -Dfile.encoding=UTF-8 -classpath $cp"
CLASS=pt.ua.tm.neji.cli.Main

Expand Down
12 changes: 12 additions & 0 deletions nejiTrain.bat
@@ -0,0 +1,12 @@
@echo off

set cp=target/neji-2.1.0-SNAPSHOT-jar-with-dependencies.jar
set memory=6144m
set encoding=UTF-8
set class=pt.ua.tm.neji.train.cli.TrainMain

:run

java -Xmx%memory% -ea -Dfile.encoding=%encoding% -classpath %cp% %class% %*

:eof
4 changes: 2 additions & 2 deletions nejiTrain.sh
@@ -1,6 +1,6 @@
#!/bin/bash
cp=target/neji-2.0.0-jar-with-dependencies.jar:$CLASSPATH
MEMORY=12G
cp=target/neji-2.1.0-SNAPSHOT-jar-with-dependencies.jar:$CLASSPATH
MEMORY=6G
JAVA_COMMAND="java -Xmx$MEMORY -Dfile.encoding=UTF-8 -classpath $cp"
CLASS=pt.ua.tm.neji.train.cli.TrainMain

Expand Down
12 changes: 12 additions & 0 deletions nejiWeb.bat
@@ -0,0 +1,12 @@
@echo off

set cp=target/neji-2.1.0-SNAPSHOT-server.jar
set memory=6144m
set encoding=UTF-8
set class=pt.ua.tm.neji.web.cli.WebMain

:run

java -Xmx%memory% -ea -Dfile.encoding=%encoding% -classpath %cp% %class% %*

:eof
2 changes: 1 addition & 1 deletion nejiWeb.sh
@@ -1,5 +1,5 @@
#!/bin/bash
cp=target/neji-2.0.0-server.jar:$CLASSPATH
cp=target/neji-2.1.0-SNAPSHOT-server.jar:$CLASSPATH
MEMORY=6G
JAVA_COMMAND="java -Xmx$MEMORY -Dfile.encoding=UTF-8 -classpath $cp"
CLASS=pt.ua.tm.neji.web.cli.WebMain
Expand Down
9 changes: 8 additions & 1 deletion pom.xml
Expand Up @@ -19,7 +19,7 @@

<groupId>pt.ua.tm</groupId>
<artifactId>neji</artifactId>
<version>2.0.0</version>
<version>2.1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>neji</name>
Expand Down Expand Up @@ -497,6 +497,13 @@
<version>3.8.10.1</version>
</dependency>

<!-- Apache Ant Core -->
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.10.1</version>
</dependency>

</dependencies>

</project>

0 comments on commit 1ce2594

Please sign in to comment.