demo docker
This commit is contained in:
parent
1a8b1b4d34
commit
9d39e3ad1a
3 changed files with 18 additions and 4 deletions
|
@ -1,7 +1,15 @@
|
|||
FROM java:openjdk-8
|
||||
|
||||
FROM alpine/git
|
||||
WORKDIR /demo
|
||||
RUN git clone https://github.com/SafeExamBrowser/seb-server.git
|
||||
|
||||
FROM maven:3.5-jdk-8-alpine
|
||||
WORKDIR /demo
|
||||
COPY --from=0 /demo/seb-server /demo
|
||||
RUN mvn clean install -e -P Demo -DskipTests
|
||||
|
||||
FROM openjdk:8-jre-alpine
|
||||
WORKDIR /demo
|
||||
COPY --from=1 /demo/target/seb-server-0.1.0-SNAPSHOT.jar /demo
|
||||
EXPOSE 8090
|
||||
|
||||
ENTRYPOINT ["java","-jar",".\seb-server-0.1.0-SNAPSHOT.jar","--spring.config.location=classpath:/config/,file:/externalResources/","--spring.profiles.active=dev"]
|
||||
ENTRYPOINT ["sh", "-c"]
|
||||
CMD ["java -jar seb-server-0.1.0-SNAPSHOT.jar --spring.config.location=classpath:/config/,file:/demo/externalResources/ --spring.profiles.active=demo"]
|
|
@ -10,8 +10,10 @@ package ch.ethz.seb.sebserver;
|
|||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@SpringBootApplication(exclude = {
|
||||
// OAuth2ResourceServerAutoConfiguration.class,
|
||||
|
@ -19,6 +21,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
//DataSourceAutoConfiguration.class
|
||||
})
|
||||
@Configuration
|
||||
@Import(DataSourceAutoConfiguration.class)
|
||||
public class SEBServer {
|
||||
|
||||
public static void main(final String[] args) {
|
||||
|
|
|
@ -12,8 +12,10 @@ import javax.sql.DataSource;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
|
@ -42,6 +44,7 @@ import ch.ethz.seb.sebserver.webservice.weblayer.WebServiceUserDetails;
|
|||
@Configuration
|
||||
@EnableAuthorizationServer
|
||||
@Order(100)
|
||||
@Import(DataSourceAutoConfiguration.class)
|
||||
public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter {
|
||||
|
||||
@Autowired
|
||||
|
|
Loading…
Reference in a new issue