From 68e53735154609e97597f5c2aa72851a518b7e1b Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 27 Aug 2019 10:36:32 +0200 Subject: [PATCH] production config --- docker/prod/standalone/selfsigned/Dockerfile | 2 +- .../selfsigned/application-prod.properties | 91 +++++++++++++++++++ .../selfsigned/application.properties | 18 ---- .../config/application-prod.properties | 12 --- 4 files changed, 92 insertions(+), 31 deletions(-) create mode 100644 docker/prod/standalone/selfsigned/application-prod.properties delete mode 100644 docker/prod/standalone/selfsigned/application.properties delete mode 100644 src/main/resources/config/application-prod.properties diff --git a/docker/prod/standalone/selfsigned/Dockerfile b/docker/prod/standalone/selfsigned/Dockerfile index 3701f3d1..a603946e 100644 --- a/docker/prod/standalone/selfsigned/Dockerfile +++ b/docker/prod/standalone/selfsigned/Dockerfile @@ -25,6 +25,6 @@ ENV SEBSERVER_VERSION=${SEBSERVER_VERSION} WORKDIR /sebserver COPY --from=1 /sebserver/target/seb-server-"$SEBSERVER_VERSION".jar /sebserver -ENTRYPOINT exec java -jar seb-server-"${SEBSERVER_VERSION}".jar --spring.config.location=classpath:/config/,file:/config/ +ENTRYPOINT exec java -jar seb-server-"${SEBSERVER_VERSION}".jar --spring.profiles.active=prod --spring.config.location=file:/config/,classpath:/config/ EXPOSE 80 \ No newline at end of file diff --git a/docker/prod/standalone/selfsigned/application-prod.properties b/docker/prod/standalone/selfsigned/application-prod.properties new file mode 100644 index 00000000..af7f9fe4 --- /dev/null +++ b/docker/prod/standalone/selfsigned/application-prod.properties @@ -0,0 +1,91 @@ +server.address=0.0.0.0 +server.port=80 +server.servlet.context-path=/ + +#security.require-ssl=true +#server.ssl.key-store-type=PKCS12 +#server.ssl.key-store=file:/sebserver/seb-server-keystore.pkcs12 +#server.ssl.key-alias=1 + + +file.encoding=UTF-8 + +javax.net.ssl.keyStore=seb-server-keystore.pkcs12 +javax.net.ssl.keyStorePassword=[SET_PWD] +javax.net.ssl.trustStore=seb-server-truststore.pkcs12 +javax.net.ssl.trustStorePassword=[SET_PWD] + + +spring.datasource.password=[SET_PWD] +sebserver.webservice.api.admin.clientSecret=[SET_PWD] +sebserver.webservice.internalSecret=[SET_PWD] + +########################################################## +### SEB Server Webservice configuration + +# logging +logging.file=log/sebserver.log + +# database server +datastore.mariadb.server.address=seb-server-mariadb +datastore.mariadb.server.port=3306 + +# data source configuration +spring.datasource.initialize=true +spring.datasource.initialization-mode=always +spring.datasource.url=jdbc:mariadb://${datastore.mariadb.server.address}:${datastore.mariadb.server.port}/SEBServer?createDatabaseIfNotExist=true&verifyServerCertificate=true&useSSL=true&requireSSL=true +spring.datasource.driver-class-name=org.mariadb.jdbc.Driver +spring.datasource.platform=prod +spring.datasource.hikari.initializationFailTimeout=30000 +spring.datasource.hikari.connectionTimeout=30000 +spring.datasource.hikari.idleTimeout=600000 +spring.datasource.hikari.maxLifetime=1800000 + +# webservice configuration +sebserver.webservice.distributed=false +sebserver.webservice.http.scheme=https +sebserver.webservice.http.server.name=${server.address} + +sebserver.webservice.http.redirect.gui=/gui +sebserver.webservice.api.admin.endpoint=/admin-api/v1 +sebserver.webservice.api.admin.accessTokenValiditySeconds=3600 +sebserver.webservice.api.admin.refreshTokenValiditySeconds=25200 +sebserver.webservice.api.exam.endpoint=/exam-api +sebserver.webservice.api.exam.endpoint.discovery=${sebserver.webservice.api.exam.endpoint}/discovery +sebserver.webservice.api.exam.endpoint.v1=${sebserver.webservice.api.exam.endpoint}/v1 +sebserver.webservice.api.exam.accessTokenValiditySeconds=3600 +sebserver.webservice.api.exam.event-handling-strategy=ASYNC_BATCH_STORE_STRATEGY +sebserver.webservice.api.exam.enable-indicator-cache=true +sebserver.webservice.api.pagination.maxPageSize=500 +# comma separated list of known possible OpenEdX API access token request endpoints +sebserver.webservice.lms.openedx.api.token.request.paths=/oauth2/access_token + +# actuator configuration +management.endpoints.web.base-path=/actuator +management.endpoints.web.exposure.include=logfile,loggers + + + +########################################################## +### SEB Server GUI configuration +server.servlet.session.cookie.http-only=true +server.servlet.session.tracking-modes=cookie + +sebserver.gui.entrypoint=/gui +sebserver.gui.webservice.protocol=https +sebserver.gui.webservice.address=localhost +sebserver.gui.webservice.port=80 +sebserver.gui.webservice.apipath=/admin-api/v1 +# defines the polling interval that is used to poll the webservice for client connection data on a monitored exam page +sebserver.gui.webservice.poll-interval=500 + + +sebserver.gui.theme=css/sebserver.css +sebserver.gui.list.page.size=20 +sebserver.gui.date.displayformat=MM/dd/yyyy HH:mm +sebserver.gui.date.displayformat.timezone=|ZZ +sebserver.gui.multilingual=false +sebserver.gui.languages=en + +sebserver.gui.seb.client.config.download.filename=SebClientSettings.seb +sebserver.gui.seb.exam.config.download.filename=SebClientSettings.seb \ No newline at end of file diff --git a/docker/prod/standalone/selfsigned/application.properties b/docker/prod/standalone/selfsigned/application.properties deleted file mode 100644 index 329b91df..00000000 --- a/docker/prod/standalone/selfsigned/application.properties +++ /dev/null @@ -1,18 +0,0 @@ -spring.profiles.active=prod - -file.encoding=UTF-8 - -javax.net.ssl.keyStore=seb-server-keystore.pkcs12 -javax.net.ssl.keyStorePassword=[SET_PWD] -javax.net.ssl.trustStore=seb-server-truststore.pkcs12 -javax.net.ssl.trustStorePassword=[SET_PWD] - -server.port=80 - -datastore.mariadb.server.address=seb-server-mariadb -datastore.mariadb.server.port=3306 -spring.datasource.password=[SET_PWD] -sebserver.webservice.api.admin.clientSecret=[SET_PWD] -sebserver.webservice.internalSecret=[SET_PWD] - -sebserver.test.property=Init Properties Found \ No newline at end of file diff --git a/src/main/resources/config/application-prod.properties b/src/main/resources/config/application-prod.properties deleted file mode 100644 index 5df4b00f..00000000 --- a/src/main/resources/config/application-prod.properties +++ /dev/null @@ -1,12 +0,0 @@ -spring.profiles.include=prod-ws,prod-gui - -server.address=[TO SET] -server.port=80 -server.servlet.context-path=/ - -datastore.mariadb.server.address=[TO SET] - -#security.require-ssl=true -#server.ssl.key-store-type=PKCS12 -#server.ssl.key-store=file:/sebserver/seb-server-keystore.pkcs12 -#server.ssl.key-alias=1 \ No newline at end of file