Add Docker infrastructure and Python project setup

- Add Python 3.12 version specification
- Add Docker Compose configuration for Caddy, Redis, LiveKit server, and LiveKit ingress
- Add Caddyfile with reverse proxy configuration for lk.makyd.cloud and whip.makyd.cloud
- Add LiveKit server configuration with RTC ports and WHIP ingress settings
- Add LiveKit ingress configuration with Redis connection and API credentials
- Add pyproject.toml with FastAPI, LiveKit API, Pydantic, and Uvicorn dependencies
- Add main
This commit is contained in:
manxzo
2025-12-23 15:26:33 +08:00
parent b9ed967167
commit 926a447a85
8 changed files with 886 additions and 0 deletions

7
docker/caddy/Caddyfile Normal file
View File

@@ -0,0 +1,7 @@
lk.makyd.cloud {
reverse_proxy 127.0.0.1:7880
}
whip.makyd.cloud {
reverse_proxy 127.0.0.1:7885
}

51
docker/compose.yaml Normal file
View File

@@ -0,0 +1,51 @@
services:
caddy:
image: caddy:2.11-alpine
container_name: caddy
restart: unless-stopped
network_mode: "host"
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy_data:/data
- ./caddy_config:/config
redis:
image: redis:8.4.0-alpine
container_name: redis
restart: unless-stopped
network_mode: "host"
volumes:
- ./redis.conf:/etc/redis.conf:ro
command: ["redis-server", "/etc/redis.conf"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 10
livekit-server:
image: livekit/livekit-server:v1.9.9
container_name: livekit-server
restart: unless-stopped
network_mode: "host"
volumes:
- ./livekit.yaml:/etc/livekit.yaml:ro
command: ["--config", "/etc/livekit.yaml"]
depends_on:
redis:
condition: service_healthy
livekit-ingress:
image: livekit/ingress:v1.4.0
container_name: livekit-ingress
restart: unless-stopped
network_mode: "host"
environment:
INGRESS_CONFIG_FILE: /etc/ingress.yaml
volumes:
- ./ingress.yaml:/etc/ingress.yaml:ro
depends_on:
redis:
condition: service_healthy
livekit-server:
condition: service_started

8
docker/ingress.yaml Normal file
View File

@@ -0,0 +1,8 @@
redis:
address: 127.0.0.1:6379
api_key: lk-api-key
api_secret: rooted123
logging:
level: info

17
docker/livekit.yaml Normal file
View File

@@ -0,0 +1,17 @@
port: 7880
bind_addresses:
- "0.0.0.0"
rtc:
udp_port: 7882
tcp_port: 7881
use_external_ip: true
redis:
address: 127.0.0.1:6379
keys:
lk-api-key: rooted123
ingress:
whip_base_url: "https://whip.makyd.cloud"