diff --git a/docker/prod/standalone/selfsigned/Dockerfile b/docker/prod/standalone/selfsigned/Dockerfile index 42f2132a..d37cd713 100644 --- a/docker/prod/standalone/selfsigned/Dockerfile +++ b/docker/prod/standalone/selfsigned/Dockerfile @@ -44,26 +44,11 @@ ENTRYPOINT exec java \ -jar seb-server-"${SEBSERVER_VERSION}".jar \ --server.port="${SERVER_PORT}" \ --spring.config.location=classpath:/config/ \ + --spring.profiles.active=prod \ --datastore.mariadb.server.address="${DBSERVER_ADDRESS}" \ --datastore.mariadb.server.port="${DBSERVER_PORT}" \ - --spring.profiles.active=prod \ --spring.datasource.password="${DBSERVER_PWD}" \ --sebserver.webservice.api.admin.clientSecret="${GUICLIENT_PWD}" \ --sebserver.webservice.internalSecret="${INTERNAL_PWD}" -#CMD ["java -jar seb-server-${SEBSERVER_VERSION}-SNAPSHOT.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}"] - -# CMD java \ -# -Dfile.encoding=UTF-8 \ -# -Djavax.net.ssl.keyStore=seb-server-keystore.pkcs12 \ -# -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PWD}" \ -# -Djavax.net.ssl.trustStore=seb-server-truststore.pkcs12 \ -# -Djavax.net.ssl.trustStorePassword="${KEYSTORE_PWD}" \ -# -jar seb-server-"${SEBSERVER_VERSION}".jar \ -# --spring.config.location=classpath:/config/,file:/sebserver/ \ -# --server.address="${SERVER_ADDRESS}" \ -# --spring.profiles.active=dev \ -# --datastore.mariadb.server.address="${DBSERVER_ADDRESS}" \ -# --datastore.mariadb.server.port="${DBSERVER_PORT}" - EXPOSE $PORT \ No newline at end of file diff --git a/src/main/resources/config/.gitignore b/src/main/resources/config/.gitignore deleted file mode 100644 index 065fbb36..00000000 --- a/src/main/resources/config/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/application-prod-gui.properties -/application-prod-ws.properties -/application-prod.properties diff --git a/src/main/resources/config/application-prod-gui.properties b/src/main/resources/config/application-prod-gui.properties new file mode 100644 index 00000000..8bc20490 --- /dev/null +++ b/src/main/resources/config/application-prod-gui.properties @@ -0,0 +1,25 @@ +server.address=localhost +server.port=8443 +server.servlet.context-path=/ + +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/src/main/resources/config/application-prod-ws.properties b/src/main/resources/config/application-prod-ws.properties new file mode 100644 index 00000000..036a0b6e --- /dev/null +++ b/src/main/resources/config/application-prod-ws.properties @@ -0,0 +1,44 @@ +# server +server.port=8090 +server.servlet.context-path=/ + +# logging +logging.file=log/sebserver.log + +# database server +datastore.mariadb.server.address=localhost +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 \ No newline at end of file diff --git a/src/main/resources/config/application-prod.properties b/src/main/resources/config/application-prod.properties new file mode 100644 index 00000000..eb1f5b6b --- /dev/null +++ b/src/main/resources/config/application-prod.properties @@ -0,0 +1,12 @@ +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