Commit 9799021c authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

MAJ Docker (up des version de Postgresql 18 et Elastic 8)

parent d5efb6de
Loading
Loading
Loading
Loading
Loading
+21 −7
Changes for docker/compose.dev.yml: 21 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ networks:
    driver: bridge

volumes:
  elastic_data:
  connor_elastic_data:
    driver: local

services:
@@ -18,7 +18,7 @@ services:
    restart: always

    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U ${POSGRESQL_USER} -d ${POSGRESQL_BASE}" ]
      test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} && psql -U $${POSTGRES_USER} -d $${POSTGRES_DB} -c 'SELECT 1;'" ]
      interval: 10s
      timeout: 5s
      retries: 5
@@ -40,7 +40,7 @@ services:
      - .env

    volumes:
      - ${VOLUMES_POSTGRESQL_DATAS}:/var/lib/postgresql/data
      - ${VOLUMES_POSTGRESQL_DATAS}:/var/lib/postgresql
      - ${VOLUMES_POSTGRESQL_INIT}:/docker-entrypoint-initdb.d

    build:
@@ -92,7 +92,8 @@ services:
    container_name: connor-gearman
    image: artefactual/gearmand:1.1.21.2-alpine
    depends_on:
      - connor-postgres
      connor-postgres:
        condition: service_healthy
    environment:
      http_proxy: ${HTTP_PROXY}
      no_proxy: ${NO_PROXY}
@@ -108,11 +109,19 @@ services:
  ### ELASTICSEARCH
  connor-elasticsearch:
    container_name: connor-elasticsearch
    image: elasticsearch:8.19.16
    image: elasticsearch:8.19.17
    environment:
      - discovery.type=single-node
      - xpack.security.enabled=false
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms${ELASTICSEARCH_MEMORY} -Xmx${ELASTICSEARCH_MEMORY}"
    healthcheck:
      # Test l'API d'Elasticsearch sur le port 9200 pour valider qu'il répond vert (green/yellow)
      test: [ "CMD-SHELL", "curl -s http://localhost:9200/_cluster/health?local=true | grep -E '\"status\":\"(green|yellow)\"'" ]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 20s
    depends_on:
      connor-postgres:
        condition: service_healthy
@@ -123,7 +132,7 @@ services:
    volumes:
      - ./docker/es_elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      - ./docker/es_log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties
      - elastic_data:/usr/share/elasticsearch/data
      - connor_elastic_data:/usr/share/elasticsearch/data
    user: "1000:1000"
    networks:
      - connor-network
@@ -158,6 +167,8 @@ services:
      - ${VOLUMES_CONFIG}/unicaen-app.local.php:/var/application/config/autoload/unicaen-app.local.php
      - ${VOLUMES_CONFIG}/unicaen-auth.local.php:/var/application/config/autoload/unicaen-auth.local.php
      - ${VOLUMES_CONFIG}/unicaen-signature.local.php:/var/application/config/autoload/unicaen-signature.local.php
      - ${VOLUMES_CONFIG}/person_db.yml:/var/application/config/connectors/person_db.yml
      - ${VOLUMES_CONFIG}/organization_db.yml:/var/application/config/connectors/organization_db.yml
      # Templates
      - ${VOLUMES_TEMPLATES}/mail.phtml:/var/application/data/templates/mail.phtml
      - ${VOLUMES_TEMPLATES}/logo.png:/var/application/data/templates/logo.png
@@ -190,7 +201,8 @@ services:
    container_name: connor-worker
    restart: unless-stopped
    depends_on:
      - connor-elasticsearch
      connor-elasticsearch:
        condition: service_healthy
    volumes:
      - ./:/var/application
      # Dossiers
@@ -207,6 +219,8 @@ services:
      - ${VOLUMES_CONFIG}/unicaen-app.local.php:/var/application/config/autoload/unicaen-app.local.php
      - ${VOLUMES_CONFIG}/unicaen-auth.local.php:/var/application/config/autoload/unicaen-auth.local.php
      - ${VOLUMES_CONFIG}/unicaen-signature.local.php:/var/application/config/autoload/unicaen-signature.local.php
      - ${VOLUMES_CONFIG}/person_db.yml:/var/application/config/connectors/person_db.yml
      - ${VOLUMES_CONFIG}/organization_db.yml:/var/application/config/connectors/organization_db.yml
      # Fichiers de configuration (PHP)
      - ${VOLUMES_CONFIG}/php/95-cli.ini:/usr/local/etc/php/conf.d/95-cli.ini
    networks:
+21 −10
Changes for docker/compose.prod.yml: 21 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ networks:
    driver: bridge

volumes:
  elastic_data:
  connor_elastic_data:
    driver: local

services:
@@ -18,7 +18,7 @@ services:
    restart: always

    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U ${POSGRESQL_USER} -d ${POSGRESQL_BASE}" ]
      test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} && psql -U $${POSTGRES_USER} -d $${POSTGRES_DB} -c 'SELECT 1;'" ]
      interval: 10s
      timeout: 5s
      retries: 5
@@ -40,7 +40,7 @@ services:
      - .env

    volumes:
      - ${VOLUMES_POSTGRESQL_DATAS}:/var/lib/postgresql/data
      - ${VOLUMES_POSTGRESQL_DATAS}:/var/lib/postgresql
      - ${VOLUMES_POSTGRESQL_INIT}:/docker-entrypoint-initdb.d

    build:
@@ -92,7 +92,8 @@ services:
    container_name: connor-gearman
    image: artefactual/gearmand:1.1.21.2-alpine
    depends_on:
      - connor-postgres
      connor-postgres:
        condition: service_healthy
    environment:
      http_proxy: ${HTTP_PROXY}
      no_proxy: ${NO_PROXY}
@@ -108,11 +109,19 @@ services:
  ### ELASTICSEARCH
  connor-elasticsearch:
    container_name: connor-elasticsearch
    image: elasticsearch:8.19.16
    image: elasticsearch:8.19.17
    environment:
      - discovery.type=single-node
      - xpack.security.enabled=false
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms${ELASTICSEARCH_MEMORY} -Xmx${ELASTICSEARCH_MEMORY}"
    healthcheck:
      # Test l'API d'Elasticsearch sur le port 9200 pour valider qu'il répond vert (green/yellow)
      test: [ "CMD-SHELL", "curl -s http://localhost:9200/_cluster/health?local=true | grep -E '\"status\":\"(green|yellow)\"'" ]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 20s
    depends_on:
      connor-postgres:
        condition: service_healthy
@@ -123,7 +132,7 @@ services:
    volumes:
      - ./docker/es_elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      - ./docker/es_log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties
      - elastic_data:/usr/share/elasticsearch/data
      - connor_elastic_data:/usr/share/elasticsearch/data
    user: "1000:1000"
    networks:
      - connor-network
@@ -158,6 +167,8 @@ services:
      - ${VOLUMES_CONFIG}/unicaen-app.local.php:/var/application/config/autoload/unicaen-app.local.php
      - ${VOLUMES_CONFIG}/unicaen-auth.local.php:/var/application/config/autoload/unicaen-auth.local.php
      - ${VOLUMES_CONFIG}/unicaen-signature.local.php:/var/application/config/autoload/unicaen-signature.local.php
      - ${VOLUMES_CONFIG}/person_db.yml:/var/application/config/connectors/person_db.yml
      - ${VOLUMES_CONFIG}/organization_db.yml:/var/application/config/connectors/organization_db.yml
      # Templates
      - ${VOLUMES_TEMPLATES}/mail.phtml:/var/application/data/templates/mail.phtml
      - ${VOLUMES_TEMPLATES}/logo.png:/var/application/data/templates/logo.png
@@ -176,8 +187,6 @@ services:
    environment:
      http_proxy: ${HTTP_PROXY}
      no_proxy: ${NO_PROXY}
      HTTP_PROXY: ${HTTP_PROXY}
      NO_PROXY: ${NO_PROXY}
    build:
      context: ./docker/
      dockerfile: app_Dockerfile
@@ -192,7 +201,8 @@ services:
    container_name: connor-worker
    restart: unless-stopped
    depends_on:
      - connor-elasticsearch
      connor-elasticsearch:
        condition: service_healthy
    volumes:
      - ./:/var/application
      # Dossiers
@@ -200,7 +210,6 @@ services:
      - ${VOLUMES_DOCUMENTS_PUBLIC}:/var/documents/public
      - ${VOLUMES_DOCUMENTS_REQUEST}:/var/documents/request
      - ${VOLUMES_DOCUMENTS_PCRU}:/var/documents/pcru
      - ${VOLUMES_DOCUMENTS_SIGNATURE}:/var/documents/signature
      - ${VOLUMES_CACHE_DOCTRINE}:/var/application/data/DoctrineORMModule/Proxy
      - ${VOLUMES_LOG}:/var/application/logs
      # Fichiers de configuration (OSCAR)
@@ -210,6 +219,8 @@ services:
      - ${VOLUMES_CONFIG}/unicaen-app.local.php:/var/application/config/autoload/unicaen-app.local.php
      - ${VOLUMES_CONFIG}/unicaen-auth.local.php:/var/application/config/autoload/unicaen-auth.local.php
      - ${VOLUMES_CONFIG}/unicaen-signature.local.php:/var/application/config/autoload/unicaen-signature.local.php
      - ${VOLUMES_CONFIG}/person_db.yml:/var/application/config/connectors/person_db.yml
      - ${VOLUMES_CONFIG}/organization_db.yml:/var/application/config/connectors/organization_db.yml
      # Fichiers de configuration (PHP)
      - ${VOLUMES_CONFIG}/php/95-cli.ini:/usr/local/etc/php/conf.d/95-cli.ini
    networks:
+1 −1
Changes for docker/postgres_Dockerfile: 1 added line, 1 removed line.
Original line number Diff line number Diff line
FROM postgres:14-alpine
FROM postgres:18-alpine

LABEL authors="Stéphane BOUVRY<stephane.bouvry@unicaen.fr>"