Loading .gitlab-ci.yml +14 −16 Original line number Diff line number Diff line Loading @@ -11,31 +11,29 @@ include: - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/deployment.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/deployment-custom-image.yml' stages: - build - license-list - pre-package - package - test-package - post-package - deploy variables: DOCKER_BUILD_ARGS: --build-arg PARENT_IMAGE_NAME=${REDMIC_SERVER_IMAGE_NAME} --build-arg PARENT_IMAGE_TAG=${REDMIC_SERVER_IMAGE_TAG} STACK: vessel PROJECT_PARENT_NAME: vessel .deploy: script: - > deploy.sh IMAGE_NAME=${IMAGE_NAME} IMAGE_TAG=${IMAGE_TAG} COMPOSE_FILE=${COMPOSE_FILE} SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE} AISHUB_SERVICE_USERNAME=${AISHUB_SERVICE_USERNAME} APP_SCHEDULING_ENABLE=${APP_SCHEDULING_ENABLE} PUBLIC_HOSTNAME=${PUBLIC_HOSTNAME} environment: url: https://${PUBLIC_HOSTNAME}/api/${CI_PROJECT_NAME} .deploy-development: .docker-build: variables: SPRING_PROFILES_ACTIVE: pre DBLD_PARENT_IMAGE_NAME: ${REDMIC_SERVER_IMAGE_NAME} DBLD_PARENT_IMAGE_TAG: ${REDMIC_SERVER_IMAGE_TAG} .deploy-production: .deploy: variables: SPRING_PROFILES_ACTIVE: prod STACK: ${PROJECT_PARENT_NAME} SERVICES_TO_CHECK: ${PROJECT_PARENT_NAME}_${CI_PROJECT_NAME} environment: url: https://${PUBLIC_HOSTNAME}/api/${CI_PROJECT_NAME} Dockerfile +4 −2 Original line number Diff line number Diff line ARG PARENT_IMAGE_NAME ARG PARENT_IMAGE_TAG ARG PARENT_IMAGE_NAME=registry.gitlab.com/redmic-project/docker/redmic-server ARG PARENT_IMAGE_TAG=latest FROM ${PARENT_IMAGE_NAME}:${PARENT_IMAGE_TAG} COPY /dist/*.jar ./ ARG MICROSERVICE_PORT=8090 EXPOSE ${MICROSERVICE_PORT} deploy/.env +3 −0 Original line number Diff line number Diff line PARENT_IMAGE_NAME=registry.gitlab.com/redmic-project/docker/redmic-server PARENT_IMAGE_TAG=latest MICROSERVICE_NAME=ais MICROSERVICE_PORT=8090 deploy/docker-compose.dev.yml +6 −7 Original line number Diff line number Diff line Loading @@ -2,14 +2,13 @@ version: '3.5' services: ais: ports: - target: ${MICROSERVICE_PORT} published: ${MICROSERVICE_PORT} mode: host environment: SPRING_PROFILES_ACTIVE: pre deploy: resources: limits: cpus: '0.5' memory: 512M cpus: '${RESOURCES_LIMITS_CPUS:-0.5}' memory: ${RESOURCES_LIMITS_MEMORY:-512M} reservations: memory: 410M cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}' memory: ${RESOURCES_RESERVATIONS_MEMORY:-410M} deploy/docker-compose.prod.yml +6 −6 Original line number Diff line number Diff line Loading @@ -2,13 +2,13 @@ version: '3.5' services: ais: environment: SPRING_PROFILES_ACTIVE: prod deploy: placement: constraints: - node.role == worker resources: limits: cpus: '0.5' memory: 1G cpus: '${RESOURCES_LIMITS_CPUS:-0.5}' memory: ${RESOURCES_LIMITS_MEMORY:-1G} reservations: memory: 820M cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}' memory: ${RESOURCES_RESERVATIONS_MEMORY:-820M} Loading
.gitlab-ci.yml +14 −16 Original line number Diff line number Diff line Loading @@ -11,31 +11,29 @@ include: - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/deployment.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/deployment-custom-image.yml' stages: - build - license-list - pre-package - package - test-package - post-package - deploy variables: DOCKER_BUILD_ARGS: --build-arg PARENT_IMAGE_NAME=${REDMIC_SERVER_IMAGE_NAME} --build-arg PARENT_IMAGE_TAG=${REDMIC_SERVER_IMAGE_TAG} STACK: vessel PROJECT_PARENT_NAME: vessel .deploy: script: - > deploy.sh IMAGE_NAME=${IMAGE_NAME} IMAGE_TAG=${IMAGE_TAG} COMPOSE_FILE=${COMPOSE_FILE} SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE} AISHUB_SERVICE_USERNAME=${AISHUB_SERVICE_USERNAME} APP_SCHEDULING_ENABLE=${APP_SCHEDULING_ENABLE} PUBLIC_HOSTNAME=${PUBLIC_HOSTNAME} environment: url: https://${PUBLIC_HOSTNAME}/api/${CI_PROJECT_NAME} .deploy-development: .docker-build: variables: SPRING_PROFILES_ACTIVE: pre DBLD_PARENT_IMAGE_NAME: ${REDMIC_SERVER_IMAGE_NAME} DBLD_PARENT_IMAGE_TAG: ${REDMIC_SERVER_IMAGE_TAG} .deploy-production: .deploy: variables: SPRING_PROFILES_ACTIVE: prod STACK: ${PROJECT_PARENT_NAME} SERVICES_TO_CHECK: ${PROJECT_PARENT_NAME}_${CI_PROJECT_NAME} environment: url: https://${PUBLIC_HOSTNAME}/api/${CI_PROJECT_NAME}
Dockerfile +4 −2 Original line number Diff line number Diff line ARG PARENT_IMAGE_NAME ARG PARENT_IMAGE_TAG ARG PARENT_IMAGE_NAME=registry.gitlab.com/redmic-project/docker/redmic-server ARG PARENT_IMAGE_TAG=latest FROM ${PARENT_IMAGE_NAME}:${PARENT_IMAGE_TAG} COPY /dist/*.jar ./ ARG MICROSERVICE_PORT=8090 EXPOSE ${MICROSERVICE_PORT}
deploy/.env +3 −0 Original line number Diff line number Diff line PARENT_IMAGE_NAME=registry.gitlab.com/redmic-project/docker/redmic-server PARENT_IMAGE_TAG=latest MICROSERVICE_NAME=ais MICROSERVICE_PORT=8090
deploy/docker-compose.dev.yml +6 −7 Original line number Diff line number Diff line Loading @@ -2,14 +2,13 @@ version: '3.5' services: ais: ports: - target: ${MICROSERVICE_PORT} published: ${MICROSERVICE_PORT} mode: host environment: SPRING_PROFILES_ACTIVE: pre deploy: resources: limits: cpus: '0.5' memory: 512M cpus: '${RESOURCES_LIMITS_CPUS:-0.5}' memory: ${RESOURCES_LIMITS_MEMORY:-512M} reservations: memory: 410M cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}' memory: ${RESOURCES_RESERVATIONS_MEMORY:-410M}
deploy/docker-compose.prod.yml +6 −6 Original line number Diff line number Diff line Loading @@ -2,13 +2,13 @@ version: '3.5' services: ais: environment: SPRING_PROFILES_ACTIVE: prod deploy: placement: constraints: - node.role == worker resources: limits: cpus: '0.5' memory: 1G cpus: '${RESOURCES_LIMITS_CPUS:-0.5}' memory: ${RESOURCES_LIMITS_MEMORY:-1G} reservations: memory: 820M cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}' memory: ${RESOURCES_RESERVATIONS_MEMORY:-820M}