fametec / glpi

GLPI Docker Container
https://hub.docker.com/r/fametec/glpi
GNU General Public License v3.0
67 stars 63 forks source link

environment VERSION #15

Closed empereira closed 3 years ago

empereira commented 3 years ago

Buenas,

A variavel VERSION: "9.5.1" configurada no .yml vai substituir a variavel do install_glpi.sh?

Caso não, como faço isso via .yml?

eduardofraga commented 3 years ago

Veja a versao 9.5.1 em https://github.com/fametec/glpi/tree/9.5.1/docker

empereira commented 3 years ago

vlw...

empereira commented 3 years ago

To usando teu dockerfile em modo stack com traefik.

Tentei setar uma env pro mariadb, mas parece que não sobrescreve.

version: "3.5"
services:
  mariadb-glpi:
    image: fametec/glpi:mariadb
    hostname: mariadb
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - ./mariadb-glpi-volume:/var/lib/mysql:rw
    environment:
      MYSQL_DATABASE: glpi
      MYSQL_USER: glpi-user
      MYSQL_PASSWORD: glpi-pass
      MYSQL_ROOT_PASSWORD: r00t
      MYSQL_RANDOM_ROOT_PASSWORD: 0

Como posso fazer isso?

empereira commented 3 years ago

buenas @eduardofraga , Como posso resetar a senha de root do mysql? Tentei configurar como na msg acima, mas não funcionou. Consegue me auxiliar?

eduardofraga commented 3 years ago

Tente fazer um dump do banco glpi, em seguida recrie o container depois restaure o dump.

empereira commented 3 years ago

Tente fazer um dump do banco glpi, em seguida recrie o container depois restaure o dump.

Já tentei fazer isso e não funcionou.

Estou usando o yml abaixo:

services:
  mariadb-glpi:
    image: fametec/glpi:mariadb
    hostname: mariadb
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - ./mariadb-glpi-volume:/var/lib/mysql:rw
    environment:
      MYSQL_ROOT_PASSWORD: r00t
      MYSQL_DATABASE: glpi
      MYSQL_USER: glpi-user
      MYSQL_PASSWORD: glpi-pass
    ports:
      - 3306
    networks:
      - traefik-net
      - glpi-dev-net
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: [node.role == manager]
  glpi:
    image: fametec/glpi:9.5.1
    hostname: glpi-dev
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - ./glpi-volume-files:/var/www/html/files:rw
      - ./glpi-volume-plugins:/var/www/html/plugins:rw
    environment:
      TIMEZONE: America/Sao_Paulo
      GLPI_LANG: pt_BR
      MARIADB_HOST: mariadb-glpi
      MARIADB_PORT: 3306
      MARIADB_DATABASE: glpi
      MARIADB_USER: glpi-user
      MARIADB_PASSWORD: glpi-pass
      VERSION: "9.5.1"
      #PLUGINS: "all"
    depends_on:
      - mariadb-glpi
    ports:
      - 30080:80
    networks:
      - traefik-net
      - glpi-dev-net
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: [node.role == manager]
      labels:
        - "traefik.docker.network=traefik-net"
        - "traefik.frontend.rule=Host:glpi-dev.local"
        - "traefik.port=80"
        - "traefik.backend=glpi-dev"
  #
  # CRON
  #
  crond:
    image: fametec/glpi:crond
    hostname: crond
    depends_on:
      - mariadb-glpi
    environment:
      MARIADB_HOST: mariadb-glpi
      MARIADB_PORT: 3306
      MARIADB_DATABASE: glpi
      MARIADB_USER: glpi-user
      MARIADB_PASSWORD: glpi-pass
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - ./crond-volume/crontab:/etc/crontab:rw
      - ./glpi-volume-files:/var/www/html/files:rw
      - ./glpi-volume-plugins:/var/www/html/plugins:rw
    networks:
      - traefik-net
      - glpi-dev-net
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: [node.role == manager]
#
# VOLUMES
#
# volumes:
#   glpi-volume-files:
#   glpi-volume-plugins:
#   mariadb-glpi-volume:
#
# NETWORKS
#
networks:
  traefik-net:
    external: true
  glpi-dev-net:
    driver: overlay

Criei as pastas e gerei o stack. docker stack deploy -c glpi-dev-stack.yml glpi-dev

No README tu diz: "After instalation the script save the credentials and variables in ''install_glpi.log'' for future maintenance."

Pra mim não foi criado esse arquivo de log.