-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.development.yml
More file actions
141 lines (135 loc) · 5.28 KB
/
docker-compose.development.yml
File metadata and controls
141 lines (135 loc) · 5.28 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# ═══════════════════════════════════════════════════════════
# PairDrop Self-Hosting Stack - Development
# BAUER GROUP | CS-PairDrop
# ═══════════════════════════════════════════════════════════
#
# Use Case: Lokale Entwicklung ohne TLS, direkter Port-Zugriff
# Profile: --profile turn aktiviert Coturn TURN Server
#
# Deployment:
# OHNE TURN: docker compose -f docker-compose.development.yml up -d
# MIT TURN: docker compose -f docker-compose.development.yml --profile turn up -d
#
# ═══════════════════════════════════════════════════════════
name: pairdrop-development
services:
# ═══════════════════════════════════════════════════════════
# PairDrop - File Sharing Web App
# ═══════════════════════════════════════════════════════════
pairdrop:
image: lscr.io/linuxserver/pairdrop:latest
container_name: PAIRDROP_SERVER
restart: unless-stopped
# Resource Limits (optional)
# Docs: https://docs.docker.com/compose/compose-file/deploy/#resources
deploy:
resources:
limits:
cpus: '${PAIRDROP_CPU_LIMIT:-1.0}'
memory: ${PAIRDROP_MEM_LIMIT:-256M}
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- TZ=${TIME_ZONE:-Etc/UTC}
- WS_FALLBACK=${WS_FALLBACK:-true}
# RATE_LIMIT: false = deaktiviert (direkter Zugriff ohne Proxy)
- RATE_LIMIT=${RATE_LIMIT:-false}
- DEBUG_MODE=${DEBUG_MODE:-true}
# RTC_CONFIG: Leer = Default STUN Server
# Mit TURN: In .env setzen: RTC_CONFIG=/rtc-config/rtc_config.json
- RTC_CONFIG=${RTC_CONFIG:-}
volumes:
- rtc-config:/rtc-config:ro
ports:
- "${PAIRDROP_PORT:-3000}:3000/tcp"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/"]
interval: 30s
timeout: 10s
start_period: 15s
retries: 3
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
local:
# ═══════════════════════════════════════════════════════════
# Config Generator - Erstellt RTC Config für TURN
# Aktiviert via: --profile turn
# ═══════════════════════════════════════════════════════════
config-generator:
profiles: [turn]
build:
context: ./src/config
dockerfile: Dockerfile
restart: "no"
container_name: PAIRDROP_CONFIG
environment:
- TURN_HOSTNAME=${TURN_REALM:-localhost}
- TURN_SECRET=${TURN_SECRET:-development-secret-change-me}
volumes:
- rtc-config:/config
# ═══════════════════════════════════════════════════════════
# Coturn - TURN/STUN Server (ohne TLS für Development)
# Aktiviert via: --profile turn
# ═══════════════════════════════════════════════════════════
coturn:
profiles: [turn]
image: coturn/coturn:latest
container_name: PAIRDROP_COTURN
restart: unless-stopped
# Resource Limits (optional - TURN kann bei Last ressourcenintensiv sein)
deploy:
resources:
limits:
cpus: '${COTURN_CPU_LIMIT:-1.0}'
memory: ${COTURN_MEM_LIMIT:-512M}
command: >
-n
--realm=${TURN_REALM:-localhost}
--listening-port=3478
--listening-ip=0.0.0.0
--min-port=${TURN_MIN_PORT:-40000}
--max-port=${TURN_MAX_PORT:-40100}
--use-auth-secret
--static-auth-secret=${TURN_SECRET:-development-secret-change-me}
--fingerprint
--log-file=stdout
--no-cli
--no-software-attribute
--user-quota=20
--total-quota=500
ports:
- "${TURN_PORT:-3478}:3478/tcp"
- "${TURN_PORT:-3478}:3478/udp"
- "${TURN_MIN_PORT:-40000}-${TURN_MAX_PORT:-40100}:${TURN_MIN_PORT:-40000}-${TURN_MAX_PORT:-40100}/udp"
networks:
local:
depends_on:
config-generator:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "turnadmin", "-l", "-N", "localhost"]
interval: 30s
timeout: 10s
start_period: 10s
retries: 3
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
### Volumes ###
volumes:
rtc-config:
driver: local
name: pairdrop-rtc-config
### Networks ###
networks:
# Internal network for service communication (IPv4 + IPv6)
local:
driver: bridge
name: PAIRDROP
enable_ipv6: true