systems:media_server:set_up_the_mediaserver_docker_compose_file
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
systems:media_server:set_up_the_mediaserver_docker_compose_file [2025/06/04 15:34] – peter | systems:media_server:set_up_the_mediaserver_docker_compose_file [2025/07/12 12:58] (current) – peter | ||
---|---|---|---|
Line 28: | Line 28: | ||
<file yaml / | <file yaml / | ||
- | |||
networks: | networks: | ||
default: | default: | ||
Line 34: | Line 33: | ||
include: | include: | ||
+ | # HOSTNAME defined in .env file | ||
+ | - compose/ | ||
+ | - compose/ | ||
+ | env_file: | ||
+ | - ' | ||
</ | </ | ||
Line 44: | Line 48: | ||
</ | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Create Socket Proxy Docker Compose ===== | ||
- | |||
- | Create a file called **socket-proxy.yml** inside **/ | ||
- | |||
- | <file yaml / | ||
- | services: | ||
- | socket-proxy: | ||
- | image: lscr.io/ | ||
- | container_name: | ||
- | environment: | ||
- | - ALLOW_START=0 #optional | ||
- | - ALLOW_STOP=0 #optional | ||
- | - ALLOW_RESTARTS=0 #optional | ||
- | - AUTH=0 #optional | ||
- | - BUILD=0 #optional | ||
- | - COMMIT=0 #optional | ||
- | - CONFIGS=0 #optional | ||
- | - CONTAINERS=0 #optional | ||
- | - DISABLE_IPV6=0 #optional | ||
- | - DISTRIBUTION=0 #optional | ||
- | - EVENTS=1 #optional | ||
- | - EXEC=0 #optional | ||
- | - IMAGES=0 #optional | ||
- | - INFO=0 #optional | ||
- | - LOG_LEVEL=info #optional | ||
- | - NETWORKS=0 #optional | ||
- | - NODES=0 #optional | ||
- | - PING=1 #optional | ||
- | - PLUGINS=0 #optional | ||
- | - POST=0 #optional | ||
- | - SECRETS=0 #optional | ||
- | - SERVICES=0 #optional | ||
- | - SESSION=0 #optional | ||
- | - SWARM=0 #optional | ||
- | - SYSTEM=0 #optional | ||
- | - TASKS=0 #optional | ||
- | - VERSION=1 #optional | ||
- | - VOLUMES=0 #optional | ||
- | volumes: | ||
- | - / | ||
- | restart: unless-stopped | ||
- | read_only: true | ||
- | tmpfs: | ||
- | - /run | ||
- | </ | ||
- | |||
- | |||
- | <WRAP alert> | ||
- | **ALERT: | ||
- | |||
- | * This poses a challenge for tools and apps that need access to the Docker API. | ||
- | * One solution is to set up a proxy that controls and secures access to the Docker API. | ||
- | |||
- | * The docker-socket-proxy will need to run as the root user to be able to proxy the docker socket to the services. | ||
- | |||
- | * See https:// | ||
- | * See https:// | ||
- | |||
- | |||
- | </ | ||
- | |||
---- | ---- | ||
- | ===== Example Service using Socket Proxy ===== | ||
- | |||
- | <code yaml example-service.yml> | ||
- | version: " | ||
- | |||
- | services: | ||
- | my-service: | ||
- | image: my-service | ||
- | environment: | ||
- | - DOCKER_HOST=tcp:// | ||
- | networks: | ||
- | - my-network | ||
- | docker-socket-proxy: | ||
- | image: tecnativa/ | ||
- | environment: | ||
- | - SERVICES=1 | ||
- | - TASKS=1 | ||
- | - NETWORKS=1 | ||
- | - NODES=1 | ||
- | volumes: | ||
- | - / | ||
- | networks: | ||
- | - my-network | ||
- | deploy: | ||
- | placement: | ||
- | constraints: | ||
- | |||
- | networks: | ||
- | my-network: | ||
- | driver: overlay | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | * The important line to add to each service is **DOCKER_HOST=tcp:// | ||
- | |||
- | * See: https:// | ||
- | |||
- | </ | ||
- | |||
- | |||
- | |||
- | ---- | ||
- | |||
- | ===== References ===== | ||
- | |||
- | https:// | ||
- | https:// |
systems/media_server/set_up_the_mediaserver_docker_compose_file.1749051243.txt.gz · Last modified: 2025/06/04 15:34 by peter