-
Notifications
You must be signed in to change notification settings - Fork 5
/
pairdrop.yml
71 lines (64 loc) · 1.87 KB
/
pairdrop.yml
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
---
- hosts: homelab
vars:
application: pairdrop
docker_network: "{{ networks.pub }}"
handlers:
- name: Restart
community.docker.docker_container:
name: "{{ application }}"
restart: true
comparisons:
'*': ignore
tasks:
- name: Create config folder
ansible.builtin.file:
path: "{{ config_directory }}"
state: directory
owner: "{{ common_user }}"
group: "{{ common_root_group }}"
mode: "0771"
- name: Create config
ansible.builtin.copy:
content: |
{
"sdpSemantics": "unified-plan",
"iceServers": [
{
"urls": "stun:coturn.{{ common_tld }}:5349"
},
{
"urls": "turn:coturn.{{ common_tld }}:5349",
"username": "{{ application }}",
"credential": "{{ coturn_users[application] }}"
}
]
}
dest: "{{ config_directory }}/rtc_config.json"
owner: "{{ common_user_id }}"
group: "{{ common_group_id }}"
mode: "0740"
notify: Restart
- name: Create container
ansible.builtin.include_role:
name: docker_container
vars:
image: ghcr.io/schlagmichdoch/pairdrop:v1.10.10
command: "npm run start:prod"
volumes:
- "{{ config_directory }}/rtc_config.json:/home/node/app/rtc_config.json"
env:
PUID: "{{ common_user_id | string }}"
PGID: "{{ common_group_id | string }}"
TZ: "{{ common_timezone }}"
RATE_LIMIT: "true"
WS_FALLBACK: "false"
RTC_CONFIG: "rtc_config.json"
DEBUG_MODE: "true"
traefik:
- port: 3000
homepage:
name: PairDrop
group: Sharing
weight: 450
description: "Local file sharing"