image du service back recup depuis dockerhub

This commit is contained in:
Alexandre Chevalier
2026-02-14 16:59:52 +01:00
parent 51aeb014f4
commit 204c890eeb
6 changed files with 78 additions and 56 deletions

3
ansible/files/.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "doodlestudent"]
path = doodlestudent
url = https://github.com/barais/doodlestudent.git

View File

@@ -2,38 +2,49 @@ services:
#https://dev.to/rafi021/how-to-set-up-a-monitoring-stack-with-prometheus-grafana-and-node-exporter-using-docker-compose-17cc #https://dev.to/rafi021/how-to-set-up-a-monitoring-stack-with-prometheus-grafana-and-node-exporter-using-docker-compose-17cc
#https://belginux.com/monitoring-docker-grafana-prometheus-cadvisor/ #https://belginux.com/monitoring-docker-grafana-prometheus-cadvisor/
#https://github.com/Einsteinish/Docker-Compose-Prometheus-and-Grafana/tree/master #https://github.com/Einsteinish/Docker-Compose-Prometheus-and-Grafana/tree/master
prometheus: # prometheus:
image: prom/prometheus:latest # image: prom/prometheus:latest
container_name: prometheus # container_name: prometheus
restart: unless-stopped # restart: unless-stopped
ports: # ports:
- "9090:9090" # - "9090:9090"
volumes: # volumes:
- ../prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro # - ../prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
command: # command:
- "--config.file=/etc/prometheus/prometheus.yml" # - "--config.file=/etc/prometheus/prometheus.yml"
depends_on: # depends_on:
- back # - back
- db # - db
networks: # networks:
- app-network # - app-network
# grafana:
# build:
# context: ..
# dockerfile: dockerfiles/grafana/Dockerfile
# container_name: grafana
# restart: unless-stopped
# volumes:
# - grafana-data:/var/lib/grafana
# - ../grafana/provisioning:/etc/grafana/provisioning
# depends_on:
# - prometheus
# environment:
# - GF_SECURITY_ADMIN_USER=tlc
# - GF_SECURITY_ADMIN_PASSWORD=tlc
# networks:
# - app-network
# https://stackoverflow.com/questions/57591868/how-correctly-install-ssl-certificate-using-certbot-in-docker
# certbot:
# image: certbot/certbot:latest
# container_name: certbot
# depends_on:
# - front
# volumes:
# - ../certbot/www/:/var/www/certbot/:rw
# - ../certbot/conf/:/etc/letsencrypt/:rw
grafana:
build:
context: ..
dockerfile: dockerfiles/grafana/Dockerfile
container_name: grafana
restart: unless-stopped
volumes:
- grafana-data:/var/lib/grafana
- ../grafana/provisioning:/etc/grafana/provisioning
depends_on:
- prometheus
environment:
- GF_SECURITY_ADMIN_USER=tlc
- GF_SECURITY_ADMIN_PASSWORD=tlc
networks:
- app-network
front: front:
build: build:
@@ -56,26 +67,13 @@ services:
networks: networks:
- app-network - app-network
# https://stackoverflow.com/questions/57591868/how-correctly-install-ssl-certificate-using-certbot-in-docker
# certbot:
# image: certbot/certbot:latest
# container_name: certbot
# depends_on:
# - front
# volumes:
# - ../certbot/www/:/var/www/certbot/:rw
# - ../certbot/conf/:/etc/letsencrypt/:rw
back: back:
build: image : benarbause/doodleback-with-quarkus:latest
context: ..
dockerfile: dockerfiles/back/Dockerfile
ports: ports:
- "8080:8080" - "8080:8080"
volumes: volumes:
- ../doodlestudent/api:/app - ../doodlestudent/api:/app
environment:
- FLASK_ENV=development
depends_on: depends_on:
db: db:
condition: service_healthy condition: service_healthy

View File

@@ -0,0 +1,2 @@
FROM grafana/grafana:latest
RUN grafana-cli plugins install grafana-munin-datasource

View File

@@ -0,0 +1,11 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
orgId: 1
url: http://prometheus:9090
basicAuth: false
isDefault: true
editable: true

View File

@@ -0,0 +1,8 @@
global:
scrape_interval: 15s
scrape_configs:
- job_name: "backend_quarkus"
metrics_path: /q/metrics
static_configs:
- targets: ["back:8080"]

View File

@@ -55,17 +55,17 @@
# Munin Configuration # Munin Configuration
#https://stackoverflow.com/questions/77941169/ansible-add-line-update-etc-hosts-when-outdated #https://stackoverflow.com/questions/77941169/ansible-add-line-update-etc-hosts-when-outdated
- name: Install Munin Node # - name: Install Munin Node
ansible.builtin.lineinfile: # ansible.builtin.lineinfile:
path: /etc/munin/munin-node.conf # path: /etc/munin/munin-node.conf
regexp: '^allow' # regexp: '^allow'
line: "allow ^127\\.0\\.0\\.1$" # line: "allow ^127\\.0\\.0\\.1$"
#
- name: Restart munin-node # - name: Restart munin-node
systemd: # systemd:
name: munin-node # name: munin-node
state: restarted # state: restarted
enabled: yes # enabled: yes
- name: Install Docker plugins - name: Install Docker plugins
apt: apt: