diff --git a/corbeille/conteneur/Dockerfile b/corbeille/conteneur/Dockerfile deleted file mode 100644 index 541fa35..0000000 --- a/corbeille/conteneur/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM debian:bullseye-slim - -# Installation des dépendances -RUN apt-get update && apt-get install -y \ - apache2 \ - supervisor \ - wget \ - curl \ - unzip \ - && rm -rf /var/lib/apt/lists/* - -# Installation Apache Exporter -RUN wget https://github.com/Lusitaniae/apache_exporter/releases/download/v1.0.10/apache_exporter-1.0.10.linux-amd64.tar.gz \ - && tar xzf apache_exporter-1.0.10.linux-amd64.tar.gz \ - && mv apache_exporter-1.0.10.linux-amd64/apache_exporter /usr/local/bin/ \ - && rm -rf apache_exporter-* - -# Installation Promtail -RUN wget https://github.com/grafana/loki/releases/download/v2.9.0/promtail-linux-amd64.zip \ - && unzip promtail-linux-amd64.zip \ - && mv promtail-linux-amd64 /usr/local/bin/promtail \ - && chmod +x /usr/local/bin/promtail \ - && rm promtail-linux-amd64.zip - -# Copie des configurations -COPY configs/apache/httpd.conf /etc/apache2/sites-available/000-default.conf -COPY configs/promtail/config.yaml /etc/promtail/config.yaml -COPY configs/supervisord/supervisord.conf /etc/supervisor/conf.d/supervisord.conf - -# Configuration Apache pour server-status -RUN echo '\n\ - SetHandler server-status\n\ - Require all granted\n\ -' > /etc/apache2/conf-available/server-status.conf \ - && a2enconf server-status \ - && a2enmod status - -# Création des répertoires de logs -RUN mkdir -p /var/log/apache2 /var/log/promtail - -EXPOSE 80 9117 9080 - -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] diff --git a/corbeille/conteneur/configs/apache/httpd.conf b/corbeille/conteneur/configs/apache/httpd.conf deleted file mode 100644 index 7c987f6..0000000 --- a/corbeille/conteneur/configs/apache/httpd.conf +++ /dev/null @@ -1,27 +0,0 @@ -# Configuration Apache de base -ServerRoot "/etc/apache2" -#Listen 80 - -# Modules (déjà chargés par défaut dans debian/ubuntu) - -ServerAdmin admin@localhost -ServerName localhost - -DocumentRoot "/var/www/html" - - Options Indexes FollowSymLinks - AllowOverride None - Require all granted - - -ErrorLog /var/log/apache2/error.log -LogLevel warn - -LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined -CustomLog /var/log/apache2/access.log combined - -# Server status pour apache_exporter - - SetHandler server-status - Require all granted - diff --git a/corbeille/conteneur/configs/promtail/config.yaml b/corbeille/conteneur/configs/promtail/config.yaml deleted file mode 100644 index fcfb2a7..0000000 --- a/corbeille/conteneur/configs/promtail/config.yaml +++ /dev/null @@ -1,26 +0,0 @@ -server: - http_listen_port: 9080 - grpc_listen_port: 0 - -positions: - filename: /tmp/positions.yaml - -clients: - - url: http://192.168.56.61:3100/loki/api/v1/push - -scrape_configs: - - job_name: apache_access - static_configs: - - targets: [localhost] - labels: - job: apache_access - host: apache_all_in_one - __path__: /var/log/apache2/access.log - - - job_name: apache_error - static_configs: - - targets: [localhost] - labels: - job: apache_error - host: apache_all_in_one - __path__: /var/log/apache2/error.log diff --git a/corbeille/conteneur/configs/supervisord/supervisord.conf b/corbeille/conteneur/configs/supervisord/supervisord.conf deleted file mode 100644 index 9f19fc9..0000000 --- a/corbeille/conteneur/configs/supervisord/supervisord.conf +++ /dev/null @@ -1,31 +0,0 @@ -[supervisord] -nodaemon=true -user=root -logfile=/var/log/supervisor/supervisord.log -pidfile=/var/run/supervisord.pid - -[program:apache2] -command=/usr/sbin/apache2ctl -D FOREGROUND -autostart=true -autorestart=true -stdout_logfile=/var/log/apache2/access.log -stderr_logfile=/var/log/apache2/error.log -priority=1 - -[program:apache_exporter] -command=/usr/local/bin/apache_exporter --scrape_uri=http://localhost/server-status?auto -autostart=true -autorestart=true -stdout_logfile=/var/log/apache_exporter.log -stderr_logfile=/var/log/apache_exporter_error.log -priority=2 -startsecs=5 - -[program:promtail] -command=/usr/local/bin/promtail -config.file=/etc/promtail/config.yaml -autostart=true -autorestart=true -stdout_logfile=/var/log/promtail/promtail.log -stderr_logfile=/var/log/promtail/promtail_error.log -priority=3 -startsecs=5 diff --git a/corbeille/conteneur/docker-compose.yml b/corbeille/conteneur/docker-compose.yml deleted file mode 100644 index 100d531..0000000 --- a/corbeille/conteneur/docker-compose.yml +++ /dev/null @@ -1,23 +0,0 @@ -services: - apache-observability: - build: - context: . - dockerfile: Dockerfile - container_name: apache_all_in_one - ports: - - "8080:80" - - "9117:9117" - - "9080:9080" - volumes: - - apache-logs:/var/log/apache2 - networks: - - centre_observabilite_observability - restart: unless-stopped - -volumes: - apache-logs: - -networks: - centre_observabilite_observability: - external: true - name: centre_observabilite_observability