/
/
/
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
62 # Meet reaches the SFU over the host gateway because livekit runs in the
63 # host network namespace and is not resolvable by container name.
64 extra_hosts:
65 - "{{ livekit_domain }}:host-gateway"
66
67 networks:
68 {{ runner_docker_network }}:
69 aliases:
70 - livekit-meet
71
72 healthcheck:
73 test: ["CMD", "curl", "-fsS", "http://localhost:{{ livekit_meet_port }}/"]
74 interval: 30s
75 timeout: 10s
76 retries: 5
77 start_period: 40s
78
79 logging:
80 driver: "{{ logging_driver }}"
81 options:
82 max-size: "{{ logging_max_size }}"
83 max-file: "{{ logging_max_file }}"
84
85 deploy:
86 resources:
87 limits:
88 memory: {{ livekit_meet_memory_limit }}
89 cpus: "{{ livekit_meet_cpu_limit }}"
90
91networks:
92 {{ runner_docker_network }}:
93 external: true
94