This commit is contained in:
Semaphore
2026-02-17 10:49:59 +00:00
2 changed files with 49 additions and 55 deletions

View 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

View File

@@ -9,7 +9,9 @@
- name: Set .env file
copy:
content: "HOSTNAME={{ inventory_hostname }}"
content: |
HOSTNAME={{ inventory_hostname }}
AGENT_SECRET={{ agent_secret | default('') }}
dest: /opt/{{ service_name }}/.env
- name: Copy compose files