Skip to content

Commit

Permalink
Add create_image.ps1
Browse files Browse the repository at this point in the history
add script to build app
  • Loading branch information
mariafg11 committed Mar 9, 2020
1 parent 7b1f4ce commit 0bc6561
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAVA_OPTS
ENV JAVA_OPTS=$JAVA_OPTS
CMD ["create_image.ps1"]
ADD webapp12.jar webapp12.jar
EXPOSE 8443
ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar webapp12.jar
Expand Down
5 changes: 5 additions & 0 deletions create_image.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cd ./daw.webapp12
docker run -imysqlt --rm --name mavenInstalation -v ${PWD}:/src -w /src maven:3.6-jdk-8 mvn clean install
mvn package
Copy-Item './target/daw.webapp12-0.0.1-SNAPSHOT.jar' '../webapp12.jar'
Write-Output 'Compilacion completa completada'
5 changes: 5 additions & 0 deletions daw.webapp12/create_image.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cd ./daw.webpp12
docker run -it --rm --name mavenInstalation -v ${PWD}:/src -w /src maven:3.6-jdk-8 mvn clean install
mvn package
Copy-Item './target/daw.webapp12-0.0.1-SNAPSHOT.jar' '../webapp12.jar'
Write-Output 'Instalacion y empaquetado de maven completada'
5 changes: 5 additions & 0 deletions daw.webapp12/docker/Web/create_image.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cd ./daw.webapp12
docker run -imysqlt --rm --name mavenInstalation -v ${PWD}:/src -w /src maven:3.6-jdk-8 mvn clean install
mvn package
Copy-Item './target/daw.webapp12-0.0.1-SNAPSHOT.jar' '../webapp12.jar'
Write-Output 'Compilacion completa completada'
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ public String register(Model model) {
public String signUp(Model model,@RequestParam String username, HttpServletRequest request, HttpServletResponse response,@RequestParam String email,@RequestParam String password) throws Exception{
String pass = password;
Optional<Users> u1= userService.findByName(username);
if (username.equals("")||pass.equals("")||email.equals("")){
return "loginError";
}
Users user = new Users(username, email, password, "ROLE_USER");
if (u1== null){
userService.addUser(user);
Expand Down

0 comments on commit 0bc6561

Please sign in to comment.