diff --git a/BuildNDeploy.sh b/BuildNDeploy.sh new file mode 100755 index 0000000..b109511 --- /dev/null +++ b/BuildNDeploy.sh @@ -0,0 +1,6 @@ +#!/bin/bash +echo "Building docker image" +docker build -t krishna444/image:job-tracker . +echo "Done! Created image, Pushing the image..." +docker push krishna444/image:job-tracker +echo "Done!" \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 90e8a3d..16bdb6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,5 @@ # Expose Spring Boot default port EXPOSE 8088 -:q! # Run the spring boot app ENTRYPOINT ["java","-jar","app.jar"] \ No newline at end of file diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties new file mode 100644 index 0000000..56df5e1 --- /dev/null +++ b/src/main/resources/application-dev.properties @@ -0,0 +1,4 @@ +server.port=8088 +spring.datasource.url=jdbc:postgresql://192.168.1.253:5432/db_test +spring.datasource.username=postgres +spring.datasource.password=00977 \ No newline at end of file diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties new file mode 100644 index 0000000..286256e --- /dev/null +++ b/src/main/resources/application-prod.properties @@ -0,0 +1,4 @@ +server.port=8088 +spring.datasource.url=jdbc:postgresql://192.168.1.253:5432/job_tracker +spring.datasource.username=jobuser +spring.datasource.password=jobpass \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index facb630..a21d89d 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,10 +1,6 @@ -server.port=8088 -spring.datasource.url=jdbc:postgresql://192.168.1.253:5432/job_tracker -spring.datasource.username=jobuser -spring.datasource.password=jobpass - +spring.profiles.active=prod #JPA/HIBERNATE -spring.jpa.hibernate.ddl-auto=validate +spring.jpa.hibernate.ddl-auto=create spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true @@ -12,7 +8,7 @@ spring.jpa.properties.hibernate.jdbc.time_zone=UTC # Flyway -spring.flyway.enabled=true +spring.flyway.enabled=false spring.flyway.locations=classpath:db/migration spring.flyway.schemas=public spring.flyway.baseline-on-migrate=true \ No newline at end of file