Commit 5e5bf9fb authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Configura primera versión de servicio y despliegue

parent a5c1b212
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: auth

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

deploy/.env

0 → 100644
+5 −0
Original line number Diff line number Diff line
PHPLDAPADMIN_LDAP_HOSTS=openldap
PHPLDAPADMIN_HTTPS=false
PHPLDAPADMIN_LDAP_CLIENT_TLS=false
DATA_VOL_NAME=phpldapadmin-data-vol
PUBLIC_HOSTNAME=change.me
+12 −0
Original line number Diff line number Diff line
version: '3.5'

services:
  phpldapadmin:
    deploy:
      placement:
        constraints:
          - node.hostname == ${PLACEMENT_CONSTRAINTS_NODE_HOSTNAME:-hostname}

volumes:
  data-vol:
    name: ${DATA_VOL_NAME}
+8 −0
Original line number Diff line number Diff line
version: '3.5'

volumes:
  data-vol:
    name: ${DATA_VOL_NAME}
    driver: 'cloudstor:aws'
    driver_opts:
      backing: shared
+37 −0
Original line number Diff line number Diff line
version: '3.5'

services:
  phpldapadmin:
    image: ${IMAGE_NAME:-osixia/phpldapadmin}:${IMAGE_TAG:-latest}
    environment:
      PHPLDAPADMIN_LDAP_HOSTS:
      PHPLDAPADMIN_HTTPS:
      PHPLDAPADMIN_LDAP_CLIENT_TLS:
    networks:
      auth-net:
    volumes:
      - data-vol:/var/www/phpldapadmin
    deploy:
      mode: replicated
      replicas: ${REPLICAS:-1}
      restart_policy:
        delay: ${RESTART_DELAY:-10s}
      update_config:
        delay: ${UPDATE_DELAY:-1m}
      labels:
        traefik.frontend.rule: Host:${TRAEFIK_SUBDOMAIN:-phpldapadmin}.${PUBLIC_HOSTNAME}
        traefik.backend: phpldapadmin
        traefik.port: '80'
      resources:
        limits:
          cpus: '${RESOURCES_LIMITS_CPUS:-0.1}'
          memory: ${RESOURCES_LIMITS_MEMORY:-64M}
        reservations:
          cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}'
          memory: ${RESOURCES_RESERVATIONS_MEMORY:-40M}

networks:
  auth-net:
    name: ${AUTH_NET_NAME:-auth-net}
    driver: ${AUTH_NET_DRIVER:-overlay}
    external: true