prepare for demo

This commit is contained in:
anhefti 2019-08-23 13:13:16 +02:00
parent bce2dfec0a
commit 744a9284a3
2 changed files with 7 additions and 7 deletions

View file

@ -1,11 +1,11 @@
FROM alpine/git FROM alpine/git
ARG GIT_TAG ARG SEBSERVER_VERSION
WORKDIR /demo WORKDIR /demo
RUN if [ "x$arg" = "x" ] ; \ RUN if [ "x${SEBSERVER_VERSION}" = "x" ] ; \
then git clone --depth 1 https://github.com/SafeExamBrowser/seb-server.git ; \ 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 else git clone -b "v$SEBSERVER_VERSION" --depth 1 https://github.com/SafeExamBrowser/seb-server.git ; fi
FROM maven:3.5-jdk-8-alpine FROM maven:3.5-jdk-8-alpine
@ -28,10 +28,10 @@ ENV GUICLIENT_PWD="[TO_SET]"
ENV INTERNAL_PWD="[TO_SET]" ENV INTERNAL_PWD="[TO_SET]"
WORKDIR /demo WORKDIR /demo
COPY --from=1 /demo/target/seb-server-"$SEBSERVER_VERSION".jar /demo COPY --from=1 /demo/target/seb-server-"$SEBSERVER_VERSION"-SNAPSHOT.jar /demo
ENTRYPOINT ["sh", "-c"] ENTRYPOINT ["sh", "-c"]
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}"] 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}"]
EXPOSE 8080 EXPOSE 8080

View file

@ -14,8 +14,8 @@ services:
build: build:
context: . context: .
args: args:
- GIT_TAG=v0.4.1-beta - GIT_TAG=
- SEBSERVER_VERSION=0.4.1-SNAPSHOT - SEBSERVER_VERSION=0.4.1-beta
container_name: seb-server container_name: seb-server
environment: environment:
- SERVER_ADDRESS=0.0.0.0 - SERVER_ADDRESS=0.0.0.0