Loading Dockerfile +0 −6 Original line number Diff line number Diff line Loading @@ -3,12 +3,6 @@ ARG PARENT_IMAGE_TAG FROM ${PARENT_IMAGE_NAME}:${PARENT_IMAGE_TAG} ENV SERVICE=undefined-service COPY /*/dist/*.jar ./ EXPOSE ${COMMANDS_PORT} ${VIEW_PORT} ENTRYPOINT java ${JAVA_OPTS} \ -Djava.security.egd=file:/dev/./urandom \ -jar ${DIRPATH}/${SERVICE}.jar .env→deploy/.env +0 −0 File moved. View file deploy/docker-compose.template-commands.dev.yml 0 → 100644 +11 −0 Original line number Diff line number Diff line version: '3.5' services: template-commands: deploy: resources: limits: cpus: '0.5' memory: 512M reservations: memory: 410M docker-compose.template-commands.prod.yml→deploy/docker-compose.template-commands.prod.yml +22 −0 Original line number Diff line number Diff line Loading @@ -2,33 +2,20 @@ version: '3.5' services: template-commands: ports: - ${COMMANDS_PORT} networks: - traefik-net deploy: mode: replicated replicas: 1 labels: traefik.port: "${COMMANDS_PORT}" traefik.docker.network: traefik-net traefik.frontend.rule: PathPrefix:/api/${UNIT_NAME}/commands traefik.backend: ${UNIT_NAME}-commands placement: constraints: - node.role == worker restart_policy: condition: on-failure max_attempts: 3 networks: traefik-net: external: true resources: limits: cpus: '0.5' memory: 512M reservations: memory: 410M volumes: commands-vol: name: "${UNIT_NAME}-commands-{{.Task.Slot}}-vol" driver: "cloudstor:aws" driver: 'cloudstor:aws' driver_opts: backing: relocatable size: 1 Loading docker-compose.template-commands.tmpl.yml→deploy/docker-compose.template-commands.tmpl.yml +45 −0 Original line number Diff line number Diff line Loading @@ -5,23 +5,41 @@ services: image: ${IMAGE_NAME}:${IMAGE_TAG:-latest} environment: - COMMANDS_PORT - SERVICE - SPRING_PROFILES_ACTIVE - JAVA_OPTS=-Xmx512m -Xss512m - MICROSERVICE_NAME=${UNIT_NAME}-commands - SPRING_KAFKA_CLIENT-ID={{.Service.Name}}-{{.Task.Slot}} - JAVA_OPTS=-XX:MaxRAMFraction=2 networks: - kafka-net - redmic-net - traefik-net volumes: - commands-vol:/tmp/kafka healthcheck: test: wget --spider -S -t 3 http://localhost:${COMMANDS_PORT}/api/${UNIT_NAME}/commands/actuator/health 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}' restart_policy: delay: 10s window: 3m networks: kafka-net: name: ${KAFKA_NET_NAME:-kafka-net} external: true redmic-net: traefik-net: name: ${TRAEFIK_NET_NAME:-traefik-net} external: true volumes: commands-vol: name: '${UNIT_NAME}-commands-{{.Task.Slot}}-vol' Loading
Dockerfile +0 −6 Original line number Diff line number Diff line Loading @@ -3,12 +3,6 @@ ARG PARENT_IMAGE_TAG FROM ${PARENT_IMAGE_NAME}:${PARENT_IMAGE_TAG} ENV SERVICE=undefined-service COPY /*/dist/*.jar ./ EXPOSE ${COMMANDS_PORT} ${VIEW_PORT} ENTRYPOINT java ${JAVA_OPTS} \ -Djava.security.egd=file:/dev/./urandom \ -jar ${DIRPATH}/${SERVICE}.jar
deploy/docker-compose.template-commands.dev.yml 0 → 100644 +11 −0 Original line number Diff line number Diff line version: '3.5' services: template-commands: deploy: resources: limits: cpus: '0.5' memory: 512M reservations: memory: 410M
docker-compose.template-commands.prod.yml→deploy/docker-compose.template-commands.prod.yml +22 −0 Original line number Diff line number Diff line Loading @@ -2,33 +2,20 @@ version: '3.5' services: template-commands: ports: - ${COMMANDS_PORT} networks: - traefik-net deploy: mode: replicated replicas: 1 labels: traefik.port: "${COMMANDS_PORT}" traefik.docker.network: traefik-net traefik.frontend.rule: PathPrefix:/api/${UNIT_NAME}/commands traefik.backend: ${UNIT_NAME}-commands placement: constraints: - node.role == worker restart_policy: condition: on-failure max_attempts: 3 networks: traefik-net: external: true resources: limits: cpus: '0.5' memory: 512M reservations: memory: 410M volumes: commands-vol: name: "${UNIT_NAME}-commands-{{.Task.Slot}}-vol" driver: "cloudstor:aws" driver: 'cloudstor:aws' driver_opts: backing: relocatable size: 1 Loading
docker-compose.template-commands.tmpl.yml→deploy/docker-compose.template-commands.tmpl.yml +45 −0 Original line number Diff line number Diff line Loading @@ -5,23 +5,41 @@ services: image: ${IMAGE_NAME}:${IMAGE_TAG:-latest} environment: - COMMANDS_PORT - SERVICE - SPRING_PROFILES_ACTIVE - JAVA_OPTS=-Xmx512m -Xss512m - MICROSERVICE_NAME=${UNIT_NAME}-commands - SPRING_KAFKA_CLIENT-ID={{.Service.Name}}-{{.Task.Slot}} - JAVA_OPTS=-XX:MaxRAMFraction=2 networks: - kafka-net - redmic-net - traefik-net volumes: - commands-vol:/tmp/kafka healthcheck: test: wget --spider -S -t 3 http://localhost:${COMMANDS_PORT}/api/${UNIT_NAME}/commands/actuator/health 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}' restart_policy: delay: 10s window: 3m networks: kafka-net: name: ${KAFKA_NET_NAME:-kafka-net} external: true redmic-net: traefik-net: name: ${TRAEFIK_NET_NAME:-traefik-net} external: true volumes: commands-vol: name: '${UNIT_NAME}-commands-{{.Task.Slot}}-vol'