Unverified Commit 0d020ce9 authored by Khalid Ali's avatar Khalid Ali Committed by GitHub
Browse files

Feature/3-Dockerize-Spring (#15)

* Start creating Dockerfile

* Add Docker and Certs

* Change cas-server to GMU server
parent 81333926
FROM openjdk:8-jre-slim
COPY ./build/libs/bookshare-backend-0.0.1-SNAPSHOT.jar /usr/src/bookshare/
COPY ./tomcat.keystore /etc/cas/tomcat.keystore
WORKDIR /usr/src/bookshare
EXPOSE 9090
CMD ["java", "-jar", "bookshare-backend-0.0.1-SNAPSHOT.jar"]
List all java versions:
* update-java-alternatives --list
Set java version as default (needs root permissions):
* sudo update-java-alternatives --set /path/to/java/version
......@@ -60,7 +60,7 @@ public class BookshareApplication {
// URL where user will be redirected to for authentication
CasAuthenticationEntryPoint entryPoint
= new CasAuthenticationEntryPoint();
entryPoint.setLoginUrl("https://localhost:9443/login");
entryPoint.setLoginUrl("https://login.gmu.edu/login");
entryPoint.setServiceProperties(sP);
return entryPoint;
}
......@@ -73,7 +73,7 @@ public class BookshareApplication {
@Bean
public TicketValidator ticketValidator() {
return new Cas30ServiceTicketValidator(
"https://localhost:9443/");
"https://login.gmu.edu/");
}
@Bean
......@@ -97,7 +97,7 @@ public class BookshareApplication {
@Bean
public LogoutFilter logoutFilter() {
LogoutFilter logoutFilter = new LogoutFilter(
"https://localhost:9443/logout",
"https://login.gmu.edu/logout",
securityContextLogoutHandler());
logoutFilter.setFilterProcessesUrl("/logout/cas");
return logoutFilter;
......@@ -106,7 +106,7 @@ public class BookshareApplication {
@Bean
public SingleSignOutFilter singleSignOutFilter() {
SingleSignOutFilter singleSignOutFilter = new SingleSignOutFilter();
singleSignOutFilter.setCasServerUrlPrefix("https://localhost:9443");
singleSignOutFilter.setCasServerUrlPrefix("https://login.gmu.edu");
singleSignOutFilter.setIgnoreInitConfiguration(true);
return singleSignOutFilter;
}
......
......@@ -6,7 +6,7 @@ spring.jpa:
show-sql: true
spring.datasource:
url: jdbc:postgresql://localhost:26257/testdb?sslmode=disable
url: jdbc:postgresql://db:26257/testdb?sslmode=disable
username: user17
password:
......@@ -21,7 +21,7 @@ server:
security:
cas:
server:
base-url: https://localhost:9443/
base-url: https://login.gmu.edu/
service:
resolution-mode: dynamic
require-ssl: true
\ No newline at end of file
require-ssl: true
File added
File added
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment