Commit 74d6835f authored by LAVENIER's avatar LAVENIER
Browse files

[fix] Data: replace MORSE_CODE by TAG_ID pmfm, in BIOPARAM program

parent 16e71c87
......@@ -74,7 +74,7 @@ variables:
- ${ARTIFACT_CONFIG_FILES}
reports:
dotenv: ${ENV_FILE}
expire_in: 60 minutes
expire_in: 72 hours
build:
extends: .build
......@@ -118,7 +118,7 @@ docker:ci:
artifacts:
paths:
- target/ci/Dockerfile
expire_in: 60 minutes
expire_in: 72 hours
# ---------------------------------------------------------------
# Test jobs
......@@ -254,7 +254,10 @@ gitlab-release:
extends: .docker
stage: docker
script:
# Create the target directory
# Build variables: set default values
- export DOCKER_RUN_USERID=${DOCKER_RUN_USERID:20001}
- export DOCKER_RUN_USERID=${DOCKER_RUN_GROUPID:20001}
# Create the target directory, to build the image
- mkdir -p target/docker/config
- cp -rf ${APP_WAR_MODULE}/src/main/docker/* target/docker/
- cp -f ${ARTIFACT_WAR_FILE} target/docker/app.war
......@@ -263,13 +266,12 @@ gitlab-release:
- cd target/docker
# Build docker image
- docker pull ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} --pull -t ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} .
#- docker build --no-cache -t ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} .
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} --pull -t ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} --build-arg="USERID=$DOCKER_RUN_USERID" --build-arg="GROUPID=$DOCKER_RUN_GROUPID" .
- docker push ${CI_REGISTRY_IMAGE}:${IMAGE_TAG}
artifacts:
paths:
- target/docker
expire_in: 60 minutes
expire_in: 72 hours
docker:develop:
extends: .docker-build
......@@ -292,6 +294,18 @@ docker:release:
only:
- tags
# /!\ For Ifremer deployment, to isi-val (build using user tomcat:ditiisi)
docker:ifremer-isi-val:
extends: .docker-build
variables:
IMAGE_TAG: $CI_COMMIT_TAG
DOCKER_RUN_USERID: '25484'
DOCKER_RUN_GROUPID: '10004'
only:
- tags
- feature/imagine
when: manual
# ---------------------------------------------------------------
# Publish jobs
# ---------------------------------------------------------------
......
FROM openjdk:8-jdk
# Build arg
ARG ENTRYPOINT=app.sh
ARG WAR_FILE=app.war
ARG CONFIG_FILES=config/*.properties
ARG USERNAME="spring"
ARG USERID="20001"
ARG GROUPNAME="spring"
ARG GROUPID="20001"
# Install dependencies
RUN apt update && apt -y install libsodium-dev
# Create execution user/group
RUN groupadd -g $GROUPID $GROUPNAME \
&& useradd -g $GROUPNAME -u $USERID $USERNAME
RUN mkdir -p /app
RUN chown -R $USERNAME:$GROUPNAME /app
USER $USERNAME:$GROUPNAME
# Copy files
COPY ${ENTRYPOINT} /app/app.sh
RUN chmod +x /app/app.sh
RUN mkdir -p /app/logs
RUN mkdir -p /app/data
COPY ${WAR_FILE} /app/app.war
COPY ${CONFIG_FILES} /app/config/
# container user managment
ENV USERNAME="sumaris_user" \
USERID="20001" \
GROUPNAME="sumaris" \
GROUPID="20001"
# TODO : remove when logfile will be overwrite
RUN touch sumaris.log.file_IS_UNDEFINED
RUN groupadd -g $GROUPID $GROUPNAME \
&& useradd -g $GROUPNAME -u $USERID $USERNAME \
&& chown -R $USERNAME:$GROUPNAME /app \
&& chown -R $USERNAME:$GROUPNAME sumaris.log.file_IS_UNDEFINED
# TODO : do we have to force user ?? (USER $USERNAME)
# Run
ENV PORT=8080 \
TZ=UTC \
PROFILES=default
......
#!/bin/bash
APP_NAME=sumaris
BASEDIR=/app
JAVA_OPTS="-Dsumaris.basedir=${BASEDIR}"
LOG_DIR=/app/logs
JAVA_OPTS="-D${APP_NAME}.basedir=${BASEDIR}"
JAVA_OPTS="${JAVA_OPTS} -Dspring.config.location=file:${BASEDIR}/config/"
JAVA_OPTS="${JAVA_OPTS} -Dsumaris.log.file=${LOG_DIR}/${APP_NAME}-pod.log"
JAVA_OPTS="${JAVA_OPTS} -Doracle.net.tns_admin=/home/tnsnames"
JAVA_OPTS="${JAVA_OPTS} -Doracle.jdbc.timezoneAsRegion=false"
[[ "_${PROFILES}" != "_" ]] && JAVA_OPTS="${JAVA_OPTS} -Dspring.profiles.active=${PROFILES}"
......@@ -12,6 +15,6 @@ ARGS=
# TODO test this
#ARGS=${@:2}
echo "*** Starting Application - args: ${ARGS} - profiles: ${PROFILES} ***"
echo "*** Starting ${APP_NAME}-pod - args: ${ARGS} - profiles: ${PROFILES} ***"
java ${JAVA_OPTS} -server -jar ${BASEDIR}/app.war ${ARGS}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment