Repository navigation
Expand file tree
/
Copy pathdocker-compose.team.work.yml
More file actions
85 lines (82 loc) · 2.73 KB
/
Copy pathdocker-compose.team.work.yml
File metadata and controls
85 lines (82 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Production opt-in for Docker-backed Work in the bundled team profile.
#
# Libre WebUI and its external worker receive only a private TCP endpoint. The
# socket stays in this dedicated proxy, which exposes the smallest Docker API
# sections used by the Work runtime: transport negotiation, info, images,
# containers, exec, volumes, and networks, with POST enabled for lifecycle
# operations. Do not attach any other service to docker-proxy.
#
# This is API-surface reduction, not a tenant or host-security boundary.
# Docker container creation can request host bind mounts, so access to this
# endpoint remains equivalent to control of the Docker host. Keep Work on a
# dedicated/rootless daemon when stronger isolation is required.
#
# docker compose --env-file /absolute/path/to/libre-team.env \
# -f docker-compose.team.yml -f docker-compose.team.work.yml up -d
services:
libre-webui:
environment:
DOCKER_HOST: tcp://docker-socket-proxy:2375
WORK_PREVIEW_BIND: ${WORK_PREVIEW_BIND:-127.0.0.1}
WORK_DOCKER_PUBLISHED_HOST: ${WORK_DOCKER_PUBLISHED_HOST:-host.docker.internal}
# Host workspaces are deliberately unavailable through this production
# overlay; task state remains in Docker-managed workspace volumes.
WORK_HOST_WORKSPACES_ENABLED: 'false'
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
docker-socket-proxy:
condition: service_started
networks:
- default
- docker-proxy
durable-worker:
environment:
DOCKER_HOST: tcp://docker-socket-proxy:2375
WORK_PREVIEW_BIND: ${WORK_PREVIEW_BIND:-127.0.0.1}
WORK_DOCKER_PUBLISHED_HOST: ${WORK_DOCKER_PUBLISHED_HOST:-host.docker.internal}
WORK_HOST_WORKSPACES_ENABLED: 'false'
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
docker-socket-proxy:
condition: service_started
networks:
- default
- docker-proxy
docker-socket-proxy:
image: tecnativa/docker-socket-proxy:v0.4.2
restart: unless-stopped
init: true
security_opt:
- no-new-privileges:true
pids_limit: 128
mem_limit: 256m
environment:
CONTAINERS: 1
IMAGES: 1
VOLUMES: 1
NETWORKS: 1
EXEC: 1
INFO: 1
PING: 1
VERSION: 1
POST: 1
# The proxy image enables the event stream by default; Work does not use
# it, so the production overlay closes it explicitly.
EVENTS: 0
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- docker-proxy
labels:
com.centurylinklabs.watchtower.enable: 'false'
logging:
driver: local
options:
max-size: 10m
max-file: '3'
networks:
docker-proxy:
driver: bridge
internal: true