Loading Dockerfile +13 −3 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} ARG PORT=8080 COPY /*/dist/*.jar ./ EXPOSE ${COMMANDS_PORT} ${VIEW_PORT} ARG PORT=8080 EXPOSE ${PORT} HEALTHCHECK \ --interval=30s \ --timeout=15s \ --start-period=3m \ --retries=10 \ CMD wget --spider -q http://localhost:${PORT}/api/${UNIT_NAME}/${MICROSERVICE_PATH}/actuator/health deploy/.env +1 −2 Original line number Diff line number Diff line UNIT_NAME=template COMMANDS_PORT=port1 VIEW_PORT=port2 PORT=8080 deploy/docker-compose.template-commands.tmpl.yml +5 −9 Original line number Diff line number Diff line Loading @@ -2,9 +2,11 @@ version: '3.5' services: template-commands: image: ${IMAGE_NAME}:${IMAGE_TAG:-latest} image: ${IMAGE_NAME:-registry.gitlab.com/redmic-project/server/template/functional-unit-template}:${IMAGE_TAG:-latest} environment: - COMMANDS_PORT - UNIT_NAME - MICROSERVICE_PATH=commands - PORT - SPRING_PROFILES_ACTIVE - MICROSERVICE_NAME=${UNIT_NAME}-commands - SPRING_KAFKA_CLIENT-ID={{.Service.Name}}-{{.Task.Slot}} Loading @@ -16,19 +18,13 @@ services: - traefik-net volumes: - commands-vol:/tmp/kafka healthcheck: test: wget --spider -q http://localhost:${COMMANDS_PORT}/api/${UNIT_NAME}/commands/actuator/health interval: 30s timeout: 10s retries: 3 start_period: 2m deploy: mode: replicated replicas: 1 labels: traefik.frontend.rule: Host:${PUBLIC_HOSTNAME};PathPrefix:/api/${UNIT_NAME}/commands traefik.backend: ${UNIT_NAME}-commands traefik.port: '${COMMANDS_PORT}' traefik.port: '${PORT}' restart_policy: delay: 10s window: 3m Loading deploy/docker-compose.template-view.tmpl.yml +5 −9 Original line number Diff line number Diff line Loading @@ -2,9 +2,11 @@ version: '3.5' services: template-view: image: ${IMAGE_NAME}:${IMAGE_TAG:-latest} image: ${IMAGE_NAME:-registry.gitlab.com/redmic-project/server/template/functional-unit-template}:${IMAGE_TAG:-latest} environment: - VIEW_PORT - UNIT_NAME - MICROSERVICE_PATH=view - PORT - SPRING_PROFILES_ACTIVE - MICROSERVICE_NAME=${UNIT_NAME}-view - SPRING_KAFKA_CLIENT-ID={{.Service.Name}}-{{.Task.Slot}} Loading @@ -14,19 +16,13 @@ services: - kafka-net - redmic-net - traefik-net healthcheck: test: wget --spider -q http://localhost:${VIEW_PORT}/api/${UNIT_NAME}/view/actuator/health interval: 30s timeout: 10s retries: 3 start_period: 2m deploy: mode: replicated replicas: 1 labels: traefik.frontend.rule: Host:${PUBLIC_HOSTNAME};PathPrefix:/api/${UNIT_NAME}/view traefik.backend: ${UNIT_NAME}-view traefik.port: '${VIEW_PORT}' traefik.port: '${PORT}' restart_policy: delay: 10s window: 3m Loading Loading
Dockerfile +13 −3 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} ARG PORT=8080 COPY /*/dist/*.jar ./ EXPOSE ${COMMANDS_PORT} ${VIEW_PORT} ARG PORT=8080 EXPOSE ${PORT} HEALTHCHECK \ --interval=30s \ --timeout=15s \ --start-period=3m \ --retries=10 \ CMD wget --spider -q http://localhost:${PORT}/api/${UNIT_NAME}/${MICROSERVICE_PATH}/actuator/health
deploy/.env +1 −2 Original line number Diff line number Diff line UNIT_NAME=template COMMANDS_PORT=port1 VIEW_PORT=port2 PORT=8080
deploy/docker-compose.template-commands.tmpl.yml +5 −9 Original line number Diff line number Diff line Loading @@ -2,9 +2,11 @@ version: '3.5' services: template-commands: image: ${IMAGE_NAME}:${IMAGE_TAG:-latest} image: ${IMAGE_NAME:-registry.gitlab.com/redmic-project/server/template/functional-unit-template}:${IMAGE_TAG:-latest} environment: - COMMANDS_PORT - UNIT_NAME - MICROSERVICE_PATH=commands - PORT - SPRING_PROFILES_ACTIVE - MICROSERVICE_NAME=${UNIT_NAME}-commands - SPRING_KAFKA_CLIENT-ID={{.Service.Name}}-{{.Task.Slot}} Loading @@ -16,19 +18,13 @@ services: - traefik-net volumes: - commands-vol:/tmp/kafka healthcheck: test: wget --spider -q http://localhost:${COMMANDS_PORT}/api/${UNIT_NAME}/commands/actuator/health interval: 30s timeout: 10s retries: 3 start_period: 2m deploy: mode: replicated replicas: 1 labels: traefik.frontend.rule: Host:${PUBLIC_HOSTNAME};PathPrefix:/api/${UNIT_NAME}/commands traefik.backend: ${UNIT_NAME}-commands traefik.port: '${COMMANDS_PORT}' traefik.port: '${PORT}' restart_policy: delay: 10s window: 3m Loading
deploy/docker-compose.template-view.tmpl.yml +5 −9 Original line number Diff line number Diff line Loading @@ -2,9 +2,11 @@ version: '3.5' services: template-view: image: ${IMAGE_NAME}:${IMAGE_TAG:-latest} image: ${IMAGE_NAME:-registry.gitlab.com/redmic-project/server/template/functional-unit-template}:${IMAGE_TAG:-latest} environment: - VIEW_PORT - UNIT_NAME - MICROSERVICE_PATH=view - PORT - SPRING_PROFILES_ACTIVE - MICROSERVICE_NAME=${UNIT_NAME}-view - SPRING_KAFKA_CLIENT-ID={{.Service.Name}}-{{.Task.Slot}} Loading @@ -14,19 +16,13 @@ services: - kafka-net - redmic-net - traefik-net healthcheck: test: wget --spider -q http://localhost:${VIEW_PORT}/api/${UNIT_NAME}/view/actuator/health interval: 30s timeout: 10s retries: 3 start_period: 2m deploy: mode: replicated replicas: 1 labels: traefik.frontend.rule: Host:${PUBLIC_HOSTNAME};PathPrefix:/api/${UNIT_NAME}/view traefik.backend: ${UNIT_NAME}-view traefik.port: '${VIEW_PORT}' traefik.port: '${PORT}' restart_policy: delay: 10s window: 3m Loading