init production profile
This commit is contained in:
parent
a7097d8b81
commit
1d305c09d8
5 changed files with 48 additions and 10 deletions
|
@ -31,8 +31,14 @@ ENV INTERNAL_PWD="[TO_SET]"
|
|||
WORKDIR /demo
|
||||
COPY --from=1 /demo/target/seb-server-"$SEBSERVER_VERSION"-SNAPSHOT.jar /demo
|
||||
|
||||
ENTRYPOINT ["sh", "-c"]
|
||||
|
||||
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}"]
|
||||
ENTRYPOINT exec java -jar seb-server-"${SEBSERVER_VERSION}"-SNAPSHOT.jar \
|
||||
--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
|
|
@ -4,7 +4,7 @@ FROM alpine/git
|
|||
ARG GIT_TAG
|
||||
|
||||
WORKDIR /sebserver
|
||||
RUN if [ "x$arg" = "x" ] ; \
|
||||
RUN if [ "x${GIT_TAG}" = "x" ] ; \
|
||||
then git clone --depth 1 https://github.com/SafeExamBrowser/seb-server.git ; \
|
||||
else git clone -b "$GIT_TAG" --depth 1 https://github.com/SafeExamBrowser/seb-server.git ; fi
|
||||
|
||||
|
@ -30,11 +30,28 @@ ENV SERVER_ADDRESS=0.0.0.0
|
|||
ENV SERVER_PORT=80
|
||||
ENV DBSERVER_ADDRESS=localhost
|
||||
ENV DBSERVER_PORT=3306
|
||||
ENV DBSERVER_PWD=
|
||||
ENV GUICLIENT_PWD=
|
||||
ENV INTERNAL_PWD=
|
||||
ENV KEYSTORE_PWD=
|
||||
|
||||
ENTRYPOINT ["sh", "-c"]
|
||||
ENTRYPOINT exec 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 \
|
||||
--server.port="${SERVER_PORT}" \
|
||||
--spring.config.location=classpath:/config/ \
|
||||
--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}.jar --spring.config.location=classpath:/config/,file:/sebserver/ --server.address=${SERVER_ADDRESS} --spring.profiles.active=dev"]
|
||||
#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 \
|
||||
|
|
|
@ -30,14 +30,17 @@ services:
|
|||
build:
|
||||
context: .
|
||||
args:
|
||||
- GIT_TAG=v0.4.0-beta
|
||||
- SEBSERVER_VERSION=0.4.0-SNAPSHOT
|
||||
- GIT_TAG=
|
||||
- SEBSERVER_VERSION=0.4.1-beta-SNAPSHOT
|
||||
container_name: seb-server
|
||||
environment:
|
||||
- SERVER_ADDRESS=0.0.0.0
|
||||
- SERVER_PORT=80
|
||||
- DBSERVER_ADDRESS=localhost
|
||||
- DBSERVER_ADDRESS=seb-server-mariadb
|
||||
- DBSERVER_PORT=3306
|
||||
- DBSERVER_PWD=somePW
|
||||
- GUICLIENT_PWD=somePW
|
||||
- INTERNAL_PWD=somePW
|
||||
- KEYSTORE_PWD=somePW
|
||||
ports:
|
||||
- 80:80
|
||||
|
|
|
@ -10,7 +10,10 @@ spring.datasource.initialization-mode=always
|
|||
spring.datasource.url=jdbc:mariadb://localhost:3306/SEBServer?createDatabaseIfNotExist=true&verifyServerCertificate=false&useSSL=false&requireSSL=false
|
||||
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
||||
spring.datasource.platform=dev
|
||||
spring.datasource.hikari.max-lifetime=600000
|
||||
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
|
||||
|
|
|
@ -67,4 +67,13 @@
|
|||
|
||||
</springProfile>
|
||||
|
||||
<springProfile name="prod">
|
||||
|
||||
<root level="INFO" additivity="true">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
|
||||
</springProfile>
|
||||
|
||||
</configuration>
|
Loading…
Reference in a new issue