diff --git a/docker/demo/Dockerfile b/docker/demo/Dockerfile index 9d88204f..56779669 100644 --- a/docker/demo/Dockerfile +++ b/docker/demo/Dockerfile @@ -19,19 +19,19 @@ FROM openjdk:8-jre-alpine ARG SEBSERVER_VERSION ENV SEBSERVER_VERSION=${SEBSERVER_VERSION} -ENV SERVER_ADDRESS=0.0.0.0 -ENV SERVER_PORT=8080 -ENV DBSERVER_ADDRESS=seb-server-mariadb -ENV DBSERVER_PORT=3306 -ENV DBSERVER_PWD= -ENV GUICLIENT_PWD= -ENV INTERNAL_PWD= +ENV SERVER_ADDRESS="0.0.0.0" +ENV SERVER_PORT="8080" +ENV DBSERVER_ADDRESS="seb-server-mariadb" +ENV DBSERVER_PORT="3306" +ENV DBSERVER_PWD="[TO_SET]" +ENV GUICLIENT_PWD="[TO_SET]" +ENV INTERNAL_PWD="[TO_SET]" WORKDIR /demo COPY --from=1 /demo/target/seb-server-"$SEBSERVER_VERSION".jar /demo ENTRYPOINT ["sh", "-c"] -CMD ["java -jar seb-server-${SEBSERVER_VERSION}.jar --server.address=${SERVER_ADDRESS} --server.port=${SERVER_PORT} --spring.config.location=classpath:/config/,file:/demo/externalResources/ --datastore.mariadb.server.address=${DBSERVER_ADDRESS} --datastore.mariadb.server.port${DBSERVER_PORT} --spring.profiles.active=demo --spring.datasource.password=${DBSERVER_PWD} --sebserver.webservice.api.admin.clientSecret={GUICLIENT_PWD} --sebserver.webservice.internalSecret=${INTERNAL_PWD}"] +CMD ["java -jar seb-server-${SEBSERVER_VERSION}.jar --server.address=${SERVER_ADDRESS} --server.port=${SERVER_PORT} --spring.config.location=classpath:/config/ --datastore.mariadb.server.address=${DBSERVER_ADDRESS} --datastore.mariadb.server.port${DBSERVER_PORT} --spring.profiles.active=demo --spring.datasource.password=${DBSERVER_PWD} --sebserver.webservice.api.admin.clientSecret={GUICLIENT_PWD} --sebserver.webservice.internalSecret=${INTERNAL_PWD}"] EXPOSE 8080 \ No newline at end of file diff --git a/docker/demo/docker-compose.yml b/docker/demo/docker-compose.yml index fa6c409a..e99a582e 100644 --- a/docker/demo/docker-compose.yml +++ b/docker/demo/docker-compose.yml @@ -3,10 +3,8 @@ services: mariadb: image: "mariadb/server:10.3" container_name: seb-server-mariadb - volumes: - - seb-server-mariadb-data:/var/lib/mysql environment: - - MYSQL_ROOT_PASSWORD=[TO SET] + MYSQL_ROOT_PASSWORD: somePW ports: - 3306:3306 networks: @@ -24,9 +22,9 @@ services: - SERVER_PORT=8080 - DBSERVER_ADDRESS=seb-server-mariadb - DBSERVER_PORT=3306 - - ENV DBSERVER_PWD=[TO SET] - - ENV GUICLIENT_PWD=[TO SET] - - ENV INTERNAL_PWD=[TO SET] + - DBSERVER_PWD=somePW + - GUICLIENT_PWD=somePW + - INTERNAL_PWD=somePW ports: - 8080:8080 networks: @@ -35,7 +33,4 @@ services: - "mariadb" networks: - ralph: - -volumes: - seb-server-mariadb-data: \ No newline at end of file + ralph: \ No newline at end of file diff --git a/docker/prod/standalone/selfsigned/docker-compose.yml b/docker/prod/standalone/selfsigned/docker-compose.yml index 3d36aa49..7cdc0e69 100644 --- a/docker/prod/standalone/selfsigned/docker-compose.yml +++ b/docker/prod/standalone/selfsigned/docker-compose.yml @@ -8,7 +8,7 @@ services: volumes: - ./certs:/certs environment: - - KEYSTORE_PWD=[TO SET] + - KEYSTORE_PWD=somePW mariadb: image: "mariadb/server:10.3" diff --git a/src/main/java/ch/ethz/seb/sebserver/SEBServer.java b/src/main/java/ch/ethz/seb/sebserver/SEBServer.java index e0d32da0..6c24b489 100644 --- a/src/main/java/ch/ethz/seb/sebserver/SEBServer.java +++ b/src/main/java/ch/ethz/seb/sebserver/SEBServer.java @@ -12,6 +12,9 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration; import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Import; + +import ch.ethz.seb.sebserver.webservice.datalayer.batis.BatisConfig; /** SEB-Server (Safe Exam Browser Server) is a server component to maintain and support * Exams running with SEB (Safe Exam Browser). TODO add link(s) @@ -32,6 +35,7 @@ import org.springframework.cache.annotation.EnableCaching; UserDetailsServiceAutoConfiguration.class, }) @EnableCaching +@Import(BatisConfig.class) public class SEBServer { public static void main(final String[] args) {