Compare commits

..

15 Commits

Author SHA1 Message Date
Semaphore
0b86b1078c feat: ajout GLPI Agent docker compose 2026-02-17 15:11:39 +00:00
fd13ce1d1f Actualiser deploy.yml 2026-02-17 10:56:19 +00:00
Semaphore
78f432b08c Merge branch 'main' of https://gitea.ruelle.fr/admin/Docker-compose 2026-02-17 10:54:03 +00:00
Semaphore
256ae9c0d3 Add stop before deploy 2026-02-17 10:53:39 +00:00
756e91ec18 Actualiser deploy.yml 2026-02-17 10:53:20 +00:00
Semaphore
709852b959 Merge branch 'main' of https://gitea.ruelle.fr/admin/Docker-compose 2026-02-17 10:49:59 +00:00
Semaphore
b9cc7a34c2 Add gitignore 2026-02-17 10:49:58 +00:00
Semaphore
bd5785bd85 Add gitignore 2026-02-17 10:49:27 +00:00
39d701d5f2 Actualiser deploy.yml 2026-02-17 10:47:22 +00:00
c9095dadf3 Actualiser Tugtainer/docker-compose.yml 2026-02-17 10:46:30 +00:00
96a3711bc7 Actualiser deploy.yml 2026-02-17 10:23:17 +00:00
9319d633fb Actualiser deploy.yml 2026-02-17 10:22:29 +00:00
067d874415 Actualiser deploy.yml 2026-02-17 10:13:06 +00:00
Semaphore
b7b335b1bf Merge branch 'main' of https://gitea.ruelle.fr/admin/Docker-compose 2026-02-17 10:07:12 +00:00
Semaphore
562fd74f39 Add deploy playbook 2026-02-17 10:05:59 +00:00
6 changed files with 95 additions and 56 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
.env
.env
.env
.env

0
FETCH_HEAD Normal file
View File

View File

@@ -1,54 +1,46 @@
networks: networks:
tugtainer_agent: tugtainer_agent:
driver: bridge driver: bridge
services: services:
# Socket proxy is used by default, socket-proxy:
# but you can mount docker socket directly image: lscr.io/linuxserver/socket-proxy:latest
# and remove this service and DOCKER_HOST variable container_name: socket-proxy
socket-proxy: environment:
image: lscr.io/linuxserver/socket-proxy:latest CONTAINERS: 1
container_name: socket-proxy EVENTS: 1
environment: IMAGES: 1
CONTAINERS: 1 INFO: 1
EVENTS: 1 LOG_LEVEL: warning
IMAGES: 1 PING: 1
INFO: 1 NETWORKS: 1
LOG_LEVEL: warning POST: 1
PING: 1 TZ: Europe/Paris
NETWORKS: 1 VERSION: 1
POST: 1 volumes:
TZ: Europe/Paris - /var/run/docker.sock:/var/run/docker.sock:ro
VERSION: 1 restart: unless-stopped
volumes: read_only: true
- /var/run/docker.sock:/var/run/docker.sock:ro tmpfs:
restart: unless-stopped - /run
read_only: true networks:
tmpfs: - tugtainer_agent
- /run labels:
networks: dev.quenary.tugtainer.protected: True
- tugtainer_agent agent:
labels: depends_on:
dev.quenary.tugtainer.protected: True - socket-proxy
agent: container_name: tugtainer-agent
depends_on: image: quenary/tugtainer-agent:latest
- socket-proxy restart: unless-stopped
container_name: tugtainer-agent environment:
image: quenary/tugtainer-agent:latest AGENT_SECRET: ${AGENT_SECRET}
# volumes: DOCKER_HOST: tcp://socket-proxy:2375
# You can uncomment this to mount socket directly, read_only: true
# and remove socket-proxy service and DOCKER_HOST variable tmpfs:
# - /var/run/docker.sock:/var/run/docker.sock:ro - /run
restart: unless-stopped networks:
environment: - tugtainer_agent
# The list of available variables is in env.example ports:
AGENT_SECRET: Rackham59 - '9413:8001'
DOCKER_HOST: tcp://socket-proxy:2375 labels:
read_only: true dev.quenary.tugtainer.protected: True
tmpfs:
- /run
networks:
- tugtainer_agent
ports:
- '9413:8001'
labels:
dev.quenary.tugtainer.protected: True

View File

@@ -1,5 +1,5 @@
--- ---
- hosts: "{{ target_hosts }}" - hosts: all
become: yes become: yes
tasks: tasks:
- name: Create directory - name: Create directory
@@ -7,6 +7,18 @@
path: /opt/{{ service_name }} path: /opt/{{ service_name }}
state: directory state: directory
- name: Set .env file
copy:
content: |
HOSTNAME={{ inventory_hostname }}
AGENT_SECRET={{ agent_secret | default('') }}
dest: /opt/{{ service_name }}/.env
- name: Force remove existing containers
shell: |
docker stop socket-proxy tugtainer-agent 2>/dev/null || true
docker rm socket-proxy tugtainer-agent 2>/dev/null || true
- name: Copy compose files - name: Copy compose files
copy: copy:
src: "{{ service_name }}/" src: "{{ service_name }}/"
@@ -15,4 +27,5 @@
- name: Deploy stack - name: Deploy stack
community.docker.docker_compose_v2: community.docker.docker_compose_v2:
project_src: /opt/{{ service_name }} project_src: /opt/{{ service_name }}
state: present state: present
recreate: always

View File

@@ -0,0 +1,30 @@
---
services:
glpi-agent:
image: rdrit/glpi-agent:latest
container_name: glpi-agent
restart: unless-stopped
network_mode: host
environment:
- GLPI_SERVER=http://192.168.123.22:8082
- GLPI_SERVER_NO_SSL_CHECK=true
- GLPI_TAG=${HOSTNAME}
- GLPI_HTTPD=1
- GLPI_HTTPD_PORT=62354
- GLPI_HTTPD_TRUST=192.168.123.0/24
- GLPI_LAZY=0
- GLPI_DELAYTIME=3600
volumes:
- /etc:/hostfs/etc:ro
- /proc:/hostfs/proc:ro
- /sys:/hostfs/sys:ro
- /var/lib/dpkg:/hostfs/var/lib/dpkg:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:62354"]
interval: 60s
timeout: 10s
retries: 3
start_period: 30s

0
main Normal file
View File