Commit a7ee4947 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Emplea volumen compartido para persistencia

En lugar de fijar nodo para usar volumen local y encontrar los
parámetros DH, emplea montaje de volumen compartido mediante efs/nfs,
permitiendo deslocalizar el servicio. Redefine volumen en lugar de
confiar en externo, aunque esté destinado a ser rellenado por otro.

Actualiza algunas variables y deja de fijar a nodo manager.
parent dcf52394
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,4 +4,4 @@ PORT_MODE=host

REDIRECT_REDMIC_CONFIG_NAME=nginx-proxy-https-redirect-redmic-config

AWS_REGION=eu-west-1
PERSISTENT_VOL_NAME=dhparams-vol
+8 −6
Original line number Diff line number Diff line
services:
  nginx-proxy-https:
    deploy:
      placement:
        constraints:
          - node.labels.${PLACEMENT_CONSTRAINTS_NODE_LABELS_NAME:-gateway} == ${PLACEMENT_CONSTRAINTS_NODE_LABELS_VALUE:-true}
volumes:
  persistent-vol:
    name: ${PERSISTENT_VOL_NAME}
    driver: ${DEV_VOL_DRIVER:-local}
    driver_opts:
      type: ${VOL_TYPE:-nfs}
      o: addr=${VOL_ADDR:-127.0.0.1},vers=${VOL_VERS:-4.2},${VOL_OPTS:-nolock,noacl,noatime,nodiratime}
      device: :${VOL_DEVICE_PREFIX}${PERSISTENT_VOL_DEVICE:-/dhparams-vol/}

configs:
  redirect-redmic-config:
+6 −6
Original line number Diff line number Diff line
services:
  nginx-proxy-https:
    deploy:
      placement:
        constraints:
          - engine.labels.availability_zone == ${AWS_REGION}a
volumes:
  persistent-vol:
    name: ${PERSISTENT_VOL_NAME}
    driver: ${PRO_VOL_DRIVER:-cloudstor:aws}
    driver_opts:
      backing: shared

configs:
  redirect-redmic-config:
+1 −6
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ services:
      replicas: ${REPLICAS:-1}
      placement:
        constraints:
          - node.role == manager
          - ${PLACEMENT_CONSTRAINTS_NAME:-node.labels.gateway} ${PLACEMENT_CONSTRAINTS_OPERATOR:-==} ${PLACEMENT_CONSTRAINTS_VALUE:-true}
      restart_policy:
        delay: ${RESTART_DELAY:-0s}
      update_config:
@@ -59,11 +59,6 @@ networks:
    driver: ${TRAEFIK_NET_DRIVER:-overlay}
    external: true

volumes:
  persistent-vol:
    name: ${PERSISTENT_VOL_NAME:-dhparams-vol}
    external: true

configs:
  default-config:
    name: ${NGINX_DEFAULT_CONFIG_NAME:-nginx-proxy-https-default-config}