Commit 291e867e authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Configura deploy de servicio, usa imagen oficial

parent dce6b806
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+15 −0
Original line number Diff line number Diff line
include:
  - project: 'redmic-project/gitlab-ci-templates'
    ref: master
    file: '/deployment.yml'

stages:
  - deploy

variables:
  PROJECT_PARENT_NAME: metric

.deploy:
  variables:
    STACK: ${PROJECT_PARENT_NAME}
    SERVICES_TO_CHECK: ${PROJECT_PARENT_NAME}_${CI_PROJECT_NAME}

deploy/.env

0 → 100644
+0 −0

Empty file added.

+1 −0
Original line number Diff line number Diff line
version: '3.5'
+1 −0
Original line number Diff line number Diff line
version: '3.5'
+33 −0
Original line number Diff line number Diff line
version: '3.5'

services:
  cadvisor:
    image: ${IMAGE_NAME:-gcr.io/google-containers/cadvisor}:${IMAGE_TAG:-latest}
    command:
      - --docker_only
    networks:
      metric-net:
    volumes:
      - /:/rootfs:ro
      - /sys:/sys:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ${DOCKER_DATA_PATH:-/var/lib/docker}:/var/lib/docker:ro
    deploy:
      mode: global
      restart_policy:
        delay: ${RESTART_DELAY:-10s}
      update_config:
        delay: ${UPDATE_DELAY:-1m}
      resources:
        limits:
          cpus: '${RESOURCES_LIMITS_CPUS:-0.1}'
          memory: ${RESOURCES_LIMITS_MEMORY:-512M}
        reservations:
          cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}'
          memory: ${RESOURCES_RESERVATIONS_MEMORY:-256M}

networks:
  metric-net:
    name: ${METRIC_NET_NAME:-metric-net}
    driver: ${METRIC_NET_DRIVER:-overlay}
    external: true