Compare commits
15 Commits
b2a5b85821
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b86b1078c | ||
| fd13ce1d1f | |||
|
|
78f432b08c | ||
|
|
256ae9c0d3 | ||
| 756e91ec18 | |||
|
|
709852b959 | ||
|
|
b9cc7a34c2 | ||
|
|
bd5785bd85 | ||
| 39d701d5f2 | |||
| c9095dadf3 | |||
| 96a3711bc7 | |||
| 9319d633fb | |||
| 067d874415 | |||
|
|
b7b335b1bf | ||
|
|
562fd74f39 |
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
.env
|
||||
.env
|
||||
.env
|
||||
.env
|
||||
0
FETCH_HEAD
Normal file
0
FETCH_HEAD
Normal file
@@ -1,54 +1,46 @@
|
||||
networks:
|
||||
tugtainer_agent:
|
||||
driver: bridge
|
||||
services:
|
||||
# Socket proxy is used by default,
|
||||
# but you can mount docker socket directly
|
||||
# and remove this service and DOCKER_HOST variable
|
||||
socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: socket-proxy
|
||||
environment:
|
||||
CONTAINERS: 1
|
||||
EVENTS: 1
|
||||
IMAGES: 1
|
||||
INFO: 1
|
||||
LOG_LEVEL: warning
|
||||
PING: 1
|
||||
NETWORKS: 1
|
||||
POST: 1
|
||||
TZ: Europe/Paris
|
||||
VERSION: 1
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
networks:
|
||||
- tugtainer_agent
|
||||
labels:
|
||||
dev.quenary.tugtainer.protected: True
|
||||
agent:
|
||||
depends_on:
|
||||
- socket-proxy
|
||||
container_name: tugtainer-agent
|
||||
image: quenary/tugtainer-agent:latest
|
||||
# volumes:
|
||||
# You can uncomment this to mount socket directly,
|
||||
# and remove socket-proxy service and DOCKER_HOST variable
|
||||
# - /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# The list of available variables is in env.example
|
||||
AGENT_SECRET: Rackham59
|
||||
DOCKER_HOST: tcp://socket-proxy:2375
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
networks:
|
||||
- tugtainer_agent
|
||||
ports:
|
||||
- '9413:8001'
|
||||
labels:
|
||||
dev.quenary.tugtainer.protected: True
|
||||
networks:
|
||||
tugtainer_agent:
|
||||
driver: bridge
|
||||
services:
|
||||
socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: socket-proxy
|
||||
environment:
|
||||
CONTAINERS: 1
|
||||
EVENTS: 1
|
||||
IMAGES: 1
|
||||
INFO: 1
|
||||
LOG_LEVEL: warning
|
||||
PING: 1
|
||||
NETWORKS: 1
|
||||
POST: 1
|
||||
TZ: Europe/Paris
|
||||
VERSION: 1
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
networks:
|
||||
- tugtainer_agent
|
||||
labels:
|
||||
dev.quenary.tugtainer.protected: True
|
||||
agent:
|
||||
depends_on:
|
||||
- socket-proxy
|
||||
container_name: tugtainer-agent
|
||||
image: quenary/tugtainer-agent:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
AGENT_SECRET: ${AGENT_SECRET}
|
||||
DOCKER_HOST: tcp://socket-proxy:2375
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
networks:
|
||||
- tugtainer_agent
|
||||
ports:
|
||||
- '9413:8001'
|
||||
labels:
|
||||
dev.quenary.tugtainer.protected: True
|
||||
|
||||
17
deploy.yml
17
deploy.yml
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- hosts: "{{ target_hosts }}"
|
||||
- hosts: all
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Create directory
|
||||
@@ -7,6 +7,18 @@
|
||||
path: /opt/{{ service_name }}
|
||||
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
|
||||
copy:
|
||||
src: "{{ service_name }}/"
|
||||
@@ -15,4 +27,5 @@
|
||||
- name: Deploy stack
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: /opt/{{ service_name }}
|
||||
state: present
|
||||
state: present
|
||||
recreate: always
|
||||
30
glpi-agent/docker-compose.yml
Normal file
30
glpi-agent/docker-compose.yml
Normal 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
|
||||
Reference in New Issue
Block a user