Commit e90fa68a authored by Noel Alonso's avatar Noel Alonso
Browse files

Elimina compose de backup y configura NFS

parent 458067a9
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
version: '3.5'

services:
    backup-db:
      deploy:
        placement:
          constraints:
            - node.hostname == ${PLACEMENT_CONSTRAINTS_NODE_HOSTNAME:-hostname}
+0 −9
Original line number Diff line number Diff line
version: '3.5'

services:
  backup-db:
    deploy:
      placement:
        constraints:
          - node.role == worker
          - engine.labels.availability_zone == ${AWS_REGION}${DESIRED_WORKER_ID}
+0 −41
Original line number Diff line number Diff line
version: '3.5'

services:
  backup-db:
    image: ${BACKUP_DB_IMAGE_NAME:-registry.gitlab.com/redmic-project/postgres/backup-db}:${BACKUP_DB_IMAGE_TAG:-latest}
    environment:
      POSTGRES_USER:
      POSTGRES_PASSWORD:
      POSTGRES_HOSTNAME:
      BUCKET_BACKUP_DB:
      AWS_ACCESS_KEY_ID:
      AWS_SECRET_ACCESS_KEY:
      PUSHGATEWAY_HOST:
      PUSHGATEWAY_JOB:
    networks:
      postgres-net:
      metric-net:
    deploy:
      mode: replicated
      replicas: ${BACKUP_DB_REPLICAS:-1}
      restart_policy:
        condition: on-failure
        delay: ${BACKUP_DB_RESTART_DELAY:-30s}
      resources:
        limits:
          cpus: '${BACKUP_DB_RESOURCES_LIMITS_CPUS:-0.5}'
          memory: ${BACKUP_DB_RESOURCES_LIMITS_MEMORY:-256M}
        reservations:
          cpus: '${BACKUP_DB_RESOURCES_RESERVATIONS_CPUS:-0.001}'
          memory: ${BACKUP_DB_RESOURCES_RESERVATIONS_MEMORY:-64M}

networks:
  postgres-net:
    name: ${POSTGRES_NET_NAME}
    driver: ${POSTGRES_NET_DRIVER:-overlay}
    external: true

  metric-net:
    name: ${METRIC_NET_NAME:-metric-net}
    driver: ${METRIC_NET_DRIVER:-overlay}
    external: true
+10 −3
Original line number Diff line number Diff line
@@ -3,9 +3,6 @@ version: '3.5'
services:
  postgresql:
    deploy:
      placement:
        constraints:
          - node.hostname == ${PLACEMENT_CONSTRAINTS_NODE_HOSTNAME:-hostname}
      resources:
        limits:
          cpus: '${POSTGRESQL_RESOURCES_LIMITS_CPUS:-1}'
@@ -17,6 +14,16 @@ services:
volumes:
  postgres-data-vol:
    name: ${POSTGRES_DATA_VOLUME_NAME}
    driver: local
    driver_opts:
      type: ${VOL_TYPE:-nfs4}
      o: addr=${VOL_ADDR:-127.0.0.1},${VOL_OPTIONS:-rw,nolock,noatime,tcp,rsize=8192,wsize=8192,timeo=14}
      device: ${POSTGRES_DATA_VOL_DEVICE:-:/postgres-data-vol/}

  postgres-wal-vol:
    name: ${POSTGRES_WAL_VOLUME_NAME}
    driver: local
    driver_opts:
      type: ${VOL_TYPE:-nfs4}
      o: addr=${VOL_ADDR:-127.0.0.1},${VOL_OPTIONS:-rw,nolock,noatime,tcp,rsize=8192,wsize=8192,timeo=14}
      device: ${POSTGRES_WAL_VOL_DEVICE:-:/postgres-wal-vol/}
Loading