Merge 26367a9009 into bfaaca8657
	
		
	
				
					
				
			
						commit
						e80411638e
					
				@ -1,27 +0,0 @@
 | 
				
			|||||||
name: Build & Publish Docker Image
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
      - master
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  docker:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Set output
 | 
					 | 
				
			||||||
        id: vars
 | 
					 | 
				
			||||||
        run: echo ::set-output name=tag::$
 | 
					 | 
				
			||||||
      - name: Set up Docker Buildx
 | 
					 | 
				
			||||||
        uses: docker/setup-buildx-action@v1
 | 
					 | 
				
			||||||
      - name: Login to DockerHub
 | 
					 | 
				
			||||||
        uses: docker/login-action@v1
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          username: ${{ secrets.DOCKER_HUB_USERNAME }}
 | 
					 | 
				
			||||||
          password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
 | 
					 | 
				
			||||||
      - name: Build and push
 | 
					 | 
				
			||||||
        id: docker_build
 | 
					 | 
				
			||||||
        uses: docker/build-push-action@v2
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          push: true
 | 
					 | 
				
			||||||
          tags: diouxx/glpi:latest
 | 
					 | 
				
			||||||
@ -1,47 +1,46 @@
 | 
				
			|||||||
#On choisit une debian
 | 
					# Choose Distribution
 | 
				
			||||||
FROM debian:11.6
 | 
					FROM debian:12
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LABEL org.opencontainers.image.authors="github@diouxx.be"
 | 
					LABEL org.opencontainers.image.authors="github@local"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Do not ask questions during installation
 | 
				
			||||||
#Ne pas poser de question à l'installation
 | 
					 | 
				
			||||||
ENV DEBIAN_FRONTEND noninteractive
 | 
					ENV DEBIAN_FRONTEND noninteractive
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#Installation d'apache et de php8.1 avec extension
 | 
					# Installation of apache2 web server as well as PHP 8.2 including extension
 | 
				
			||||||
RUN apt update \
 | 
					RUN apt update \
 | 
				
			||||||
&& apt install --yes ca-certificates apt-transport-https lsb-release wget curl \
 | 
					&& apt install --yes ca-certificates apt-transport-https lsb-release wget curl \
 | 
				
			||||||
&& curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg \ 
 | 
					 | 
				
			||||||
&& sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' \
 | 
					 | 
				
			||||||
&& apt update \
 | 
					&& apt update \
 | 
				
			||||||
&& apt install --yes --no-install-recommends \
 | 
					&& apt install --yes --no-install-recommends \
 | 
				
			||||||
apache2 \
 | 
					apache2 \
 | 
				
			||||||
php8.1 \
 | 
					php8.2 \
 | 
				
			||||||
php8.1-mysql \
 | 
					php8.2-mysql \
 | 
				
			||||||
php8.1-ldap \
 | 
					php8.2-ldap \
 | 
				
			||||||
php8.1-xmlrpc \
 | 
					php8.2-xmlrpc \
 | 
				
			||||||
php8.1-imap \
 | 
					php8.2-imap \
 | 
				
			||||||
php8.1-curl \
 | 
					php8.2-curl \
 | 
				
			||||||
php8.1-gd \
 | 
					php8.2-gd \
 | 
				
			||||||
php8.1-mbstring \
 | 
					php8.2-mbstring \
 | 
				
			||||||
php8.1-xml \
 | 
					php8.2-xml \
 | 
				
			||||||
php-cas \
 | 
					php-cas \
 | 
				
			||||||
php8.1-intl \
 | 
					php8.2-intl \
 | 
				
			||||||
php8.1-zip \
 | 
					php8.2-zip \
 | 
				
			||||||
php8.1-bz2 \
 | 
					php8.2-bz2 \
 | 
				
			||||||
php8.1-redis \
 | 
					php8.2-redis \
 | 
				
			||||||
 | 
					php8.2-xmlreader \
 | 
				
			||||||
 | 
					php8.2-xmlwriter \
 | 
				
			||||||
cron \
 | 
					cron \
 | 
				
			||||||
jq \
 | 
					jq \
 | 
				
			||||||
libldap-2.4-2 \
 | 
					libldap-2.5-0 \
 | 
				
			||||||
libldap-common \
 | 
					libldap-common \
 | 
				
			||||||
libsasl2-2 \
 | 
					libsasl2-2 \
 | 
				
			||||||
libsasl2-modules \
 | 
					libsasl2-modules \
 | 
				
			||||||
libsasl2-modules-db \
 | 
					libsasl2-modules-db \
 | 
				
			||||||
&& rm -rf /var/lib/apt/lists/*
 | 
					&& rm -rf /var/lib/apt/lists/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#Copie et execution du script pour l'installation et l'initialisation de GLPI
 | 
					# Copy and Execute Script for Installation and Initialization of GLPI
 | 
				
			||||||
COPY glpi-start.sh /opt/
 | 
					COPY glpi-start.sh /opt/
 | 
				
			||||||
RUN chmod +x /opt/glpi-start.sh
 | 
					RUN chmod +x /opt/glpi-start.sh
 | 
				
			||||||
ENTRYPOINT ["/opt/glpi-start.sh"]
 | 
					ENTRYPOINT ["/opt/glpi-start.sh"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#Exposition des ports
 | 
					# Expose Web Server Ports
 | 
				
			||||||
EXPOSE 80 443
 | 
					EXPOSE 80 443
 | 
				
			||||||
 | 
				
			|||||||
@ -1,28 +1,55 @@
 | 
				
			|||||||
version: "3.2"
 | 
					version: "3.2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
services:
 | 
					services:
 | 
				
			||||||
#MariaDB Container
 | 
					# MariaDB Container
 | 
				
			||||||
  mariadb:
 | 
					  glpi_mariadb:
 | 
				
			||||||
    image: mariadb:10.7
 | 
					    image: mariadb:latest
 | 
				
			||||||
    container_name: mariadb
 | 
					    container_name: glpi_mariadb
 | 
				
			||||||
    hostname: mariadb
 | 
					    hostname: glpi_mariadb
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - /var/lib/mysql:/var/lib/mysql
 | 
					      - ~/data/glpi/db:/var/lib/mysql
 | 
				
			||||||
    env_file:
 | 
					 | 
				
			||||||
      - ./mariadb.env
 | 
					 | 
				
			||||||
    restart: always
 | 
					    restart: always
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      - MARIADB_ROOT_PASSWORD_FILE=/run/secrets/MARIADB_ROOT_PASSWORD
 | 
				
			||||||
 | 
					      - MARIADB_USER_FILE=/run/secrets/MARIADB_USER
 | 
				
			||||||
 | 
					      - MARIADB_PASSWORD_FILE=/run/secrets/MARIADB_PASSWORD
 | 
				
			||||||
 | 
					      - MARIADB_DATABASE_FILE=/run/secrets/MARIADB_DATABASE
 | 
				
			||||||
 | 
					    secrets:
 | 
				
			||||||
 | 
					      - MARIADB_ROOT_PASSWORD
 | 
				
			||||||
 | 
					      - MARIADB_USER
 | 
				
			||||||
 | 
					      - MARIADB_PASSWORD
 | 
				
			||||||
 | 
					      - MARIADB_DATABASE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#GLPI Container
 | 
					# GLPI Container
 | 
				
			||||||
  glpi:
 | 
					  glpi:
 | 
				
			||||||
    image: diouxx/glpi
 | 
					    image: glpi
 | 
				
			||||||
    container_name : glpi
 | 
					    container_name: glpi
 | 
				
			||||||
    hostname: glpi
 | 
					    hostname: glpi
 | 
				
			||||||
    ports:
 | 
					 | 
				
			||||||
      - "80:80"
 | 
					 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - /etc/timezone:/etc/timezone:ro
 | 
					      - /etc/timezone:/etc/timezone:ro
 | 
				
			||||||
      - /etc/localtime:/etc/localtime:ro
 | 
					      - /etc/localtime:/etc/localtime:ro
 | 
				
			||||||
      - /var/www/html/glpi/:/var/www/html/glpi
 | 
					      - ~/data/glpi/www:/var/www/html/glpi
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      - TIMEZONE=Europe/Brussels
 | 
					      - TIMEZONE=Europe/Brussels
 | 
				
			||||||
    restart: always
 | 
					    restart: always
 | 
				
			||||||
 | 
					    networks:
 | 
				
			||||||
 | 
					      - traefik
 | 
				
			||||||
 | 
					    labels:
 | 
				
			||||||
 | 
					      - "traefik.enable=true"
 | 
				
			||||||
 | 
					      - "traefik.http.routers.glpi-router.rule=Host(`glpi.MYDOMAIN.TLD`)"
 | 
				
			||||||
 | 
					      - "traefik.http.services.glpi-service.loadbalancer.server.port=80"
 | 
				
			||||||
 | 
					      - "traefik.docker.network=traefik"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					networks:
 | 
				
			||||||
 | 
					  traefik:
 | 
				
			||||||
 | 
					    external: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					secrets:
 | 
				
			||||||
 | 
					   MARIADB_ROOT_PASSWORD:
 | 
				
			||||||
 | 
					      file: ~/secrets/glpi/MARIADB_ROOT_PASSWORD.txt
 | 
				
			||||||
 | 
					   MARIADB_DATABASE:
 | 
				
			||||||
 | 
					      file: ~/secrets/glpi/MARIADB_DATABASE.txt
 | 
				
			||||||
 | 
					   MARIADB_USER:
 | 
				
			||||||
 | 
					      file: ~/secrets/glpi/MARIADB_USER.txt
 | 
				
			||||||
 | 
					   MARIADB_PASSWORD:
 | 
				
			||||||
 | 
					      file: ~/secrets/glpi/MARIADB_PASSWORD.txt
 | 
				
			||||||
 | 
				
			|||||||
					Loading…
					
					
				
		Reference in new issue