Commit 103e60f1 authored by Ignacio's avatar Ignacio
Browse files

Elimina unifica config de compose

parent 130805f9
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
version: '3.5'

services:
  vessels-commands:
    ports:
      - target: ${COMMANDS_PORT}
        published: ${COMMANDS_PORT}
        mode: host
    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
      restart_policy:
        delay: 1m
        window: 3m
      resources:
        limits:
          cpus: '2'
          memory: 1G
        reservations:
          memory: 820M

volumes:
  commands-vol:
    name: ${UNIT_NAME}-commands-vol
+0 −23
Original line number Diff line number Diff line
version: '3.5'

services:
  vessels-commands:
    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:
        delay: 1m
        window: 3m
      resources:
        limits:
          cpus: '2'
          memory: 1G
        reservations:
          memory: 820M

volumes:
  commands-vol:
    name: "${UNIT_NAME}-commands-{{.Task.Slot}}-vol"
+17 −0
Original line number Diff line number Diff line
@@ -11,6 +11,23 @@ services:
      - MICROSERVICE_NAME=${UNIT_NAME}-commands
      - SPRING_KAFKA_CLIENT-ID={{.Service.Name}}-{{.Task.Slot}}
      - JAVA_OPTS=-XX:MaxRAMFraction=2
    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
      restart_policy:
        delay: 1m
        window: 3m
      resources:
        limits:
          cpus: '2'
          memory: 1G
        reservations:
          memory: 820M
    networks:
      - kafka-net
      - redmic-net