/
/
/
Ansible role that deployes services on my runner machine
1# LiveKit Conferencing Stack
2# Generated by Ansible - DO NOT EDIT MANUALLY
3
4services:
5 livekit:
6 container_name: livekit
7 image: "{{ container_images.livekit }}"
8 restart: unless-stopped
9
10 # WebRTC requires host networking. Docker's userland proxy rewrites UDP
11 # source addresses on a bridge network, which breaks ICE candidate
12 # resolution: signaling succeeds and media then fails silently.
13 network_mode: host
14
15 command: ["--config", "/etc/livekit.yaml"]
16
17 volumes:
18 - /etc/localtime:/etc/localtime:ro
19 - {{ livekit_config_dir }}/livekit.yaml:/etc/livekit.yaml:ro
20 - {{ livekit_data_dir }}:/data
21
22 healthcheck:
23 test: ["CMD", "wget", "-qO-", "http://localhost:{{ livekit_port }}/"]
24 interval: 30s
25 timeout: 10s
26 retries: 5
27 start_period: 30s
28
29 logging:
30 driver: "{{ logging_driver }}"
31 options:
32 max-size: "{{ logging_max_size }}"
33 max-file: "{{ logging_max_file }}"
34
35 deploy:
36 resources:
37 limits:
38 memory: {{ livekit_memory_limit }}
39 cpus: "{{ livekit_cpu_limit }}"
40
41 livekit-meet:
42 container_name: livekit-meet
43 build:
44 context: {{ livekit_config_dir }}
45 dockerfile: Dockerfile.meet
46 image: livekit-meet:{{ livekit_meet_repo_version }}
47 restart: unless-stopped
48
49 depends_on:
50 livekit:
51 condition: service_healthy
52
53 env_file:
54 - .env
55
56 ports:
57 - "{{ livekit_meet_port }}:{{ livekit_meet_port }}"
58
59 volumes:
60 - /etc/localtime:/etc/localtime:ro
61{% if livekit_agent_avatar_enabled %}
62 # Next.js serves /app/public at the site root, so this lands at
63 # /{{ livekit_agent_avatar_filename }}. Bind-mounted rather than baked
64 # into the image so changing the picture does not need a rebuild.
65 - {{ livekit_config_dir }}/assets/{{ livekit_agent_avatar_filename }}:/app/public/{{ livekit_agent_avatar_filename }}:ro
66{% endif %}
67
68 # Meet reaches the SFU over the host gateway because livekit runs in the
69 # host network namespace and is not resolvable by container name.
70 extra_hosts:
71 - "{{ livekit_domain }}:host-gateway"
72
73 networks:
74 {{ runner_docker_network }}:
75 aliases:
76 - livekit-meet
77
78 healthcheck:
79 test: ["CMD", "curl", "-fsS", "http://localhost:{{ livekit_meet_port }}/"]
80 interval: 30s
81 timeout: 10s
82 retries: 5
83 start_period: 40s
84
85 logging:
86 driver: "{{ logging_driver }}"
87 options:
88 max-size: "{{ logging_max_size }}"
89 max-file: "{{ logging_max_file }}"
90
91 deploy:
92 resources:
93 limits:
94 memory: {{ livekit_meet_memory_limit }}
95 cpus: "{{ livekit_meet_cpu_limit }}"
96
97networks:
98 {{ runner_docker_network }}:
99 external: true
100