Skip to content

Commit

Permalink
Updated create_image
Browse files Browse the repository at this point in the history
Add angular to docker
  • Loading branch information
mariafg11 committed Apr 16, 2020
1 parent 444b8c6 commit 4c2c0ad
Show file tree
Hide file tree
Showing 27 changed files with 1,726 additions and 1,098 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
hs_err_pid*

daw.webapp12/src/main/resources/application.properties
daw.webapp12/src/main/resources/application.properties
28 changes: 28 additions & 0 deletions WebApp12Angular/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion create_image.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
cd ./WebApp12Angular

docker run -it --rm --name angularInstalation -v ${PWD}:/src -w /src node /bin/bash -c "npm install -g @angular/cli; npm install; ng build --baseHref=/new/"
Remove-Item '../daw.webapp12/src/main/resources/public/new/*'
Copy-Item -recurse './dist/app/*' '../daw.webapp12/src/main/resources/public/new/'

cd ..
cd ./daw.webapp12
docker run --network=bridge --rm --name mysql -e "MYSQL_ROOT_PASSWORD=13777091825" -e "MYSQL_DATABASE=daw_webapp12" -e "MYSQL_ROOT_HOST=%" -d -p 3306:3306 mysql:latest
# Start-Sleep -s 5
docker run --network=bridge --rm --name mavenInstalation --link mysql:mysql -v ${PWD}:/src -w /src maven:3.6-jdk-8 mvn clean install
docker run --network=bridge --rm --name mavenInstalation --link mysql:mysql -v ${PWD}:/src -w /src maven:3.6-jdk-8 /bin/bash -c "mvn clean install; mvn package;"
docker stop mysql

Copy-Item './target/daw.webapp12-0.0.1-SNAPSHOT.jar' '../webapp12.jar'
cd ..

docker build --rm -f "Dockerfile" -t webapp12:latest "."
#Write-Output 'Compilacion completa'
2 changes: 1 addition & 1 deletion daw.webapp12/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring.datasource.url=jdbc:mysql://localhost/daw_webapp12?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.url=jdbc:mysql://mysql/daw_webapp12?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=13777091825
server.port=8443
Expand Down
Loading

0 comments on commit 4c2c0ad

Please sign in to comment.