Replace master branch with local files
This commit is contained in:
commit
875a53f499
60 changed files with 21637 additions and 0 deletions
134
docker-compose.yml
Normal file
134
docker-compose.yml
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: streaming
|
||||
POSTGRES_USER: streamuser
|
||||
POSTGRES_PASSWORD: streampass # Fixed: hardcoded for consistency
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
- ./scripts:/scripts:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U streamuser -d streaming"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- backend
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- backend
|
||||
|
||||
ovenmediaengine:
|
||||
image: airensoft/ovenmediaengine:latest
|
||||
ports:
|
||||
- "1935:1935" # RTMP
|
||||
- "9999:9999/udp" # SRT
|
||||
- "8088:8080" # HLS/LLHLS
|
||||
- "8081:8081" # API (internal)
|
||||
- "3333:3333" # WebRTC Signaling
|
||||
- "3478:3478" # WebRTC ICE
|
||||
- "10000-10009:10000-10009/udp" # WebRTC Candidates
|
||||
volumes:
|
||||
- ./ovenmediaengine/Server.xml:/opt/ovenmediaengine/bin/origin_conf/Server.xml
|
||||
- ome_logs:/var/log/ovenmediaengine
|
||||
environment:
|
||||
OME_API_PORT: 8081
|
||||
OME_API_ACCESS_TOKEN: your-api-token
|
||||
networks:
|
||||
- backend
|
||||
- frontend
|
||||
|
||||
drogon-backend:
|
||||
build: ./backend
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DB_HOST: postgres
|
||||
DB_NAME: streaming
|
||||
DB_USER: streamuser
|
||||
DB_PASS: streampass # Fixed: matching postgres password
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: 6379
|
||||
JWT_SECRET: your-jwt-secret
|
||||
OME_API_URL: http://ovenmediaengine:8081
|
||||
OME_API_TOKEN: your-api-token
|
||||
volumes:
|
||||
- ./backend/config.json:/app/config.json
|
||||
- uploads:/app/uploads
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/api/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
networks:
|
||||
- backend
|
||||
|
||||
openresty:
|
||||
build: ./openresty
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
depends_on:
|
||||
drogon-backend:
|
||||
condition: service_healthy
|
||||
ovenmediaengine:
|
||||
condition: service_started
|
||||
redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: 6379
|
||||
BACKEND_URL: http://drogon-backend:8080
|
||||
OME_URL: http://ovenmediaengine:8081
|
||||
volumes:
|
||||
- ./openresty/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
|
||||
- ./openresty/lua:/usr/local/openresty/nginx/lua
|
||||
- uploads:/app/uploads:ro # Mount uploads volume to the same path
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
sveltekit:
|
||||
build: ./frontend
|
||||
depends_on:
|
||||
openresty:
|
||||
condition: service_started
|
||||
environment:
|
||||
# Fixed: Added VITE_ prefix for client-side access
|
||||
VITE_API_URL: http://localhost/api
|
||||
VITE_WS_URL: ws://localhost/ws
|
||||
VITE_STREAM_PORT: 8088
|
||||
# Server-side only variables (no prefix needed)
|
||||
NODE_ENV: production
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
networks:
|
||||
frontend:
|
||||
driver: bridge
|
||||
backend:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
ome_logs:
|
||||
uploads: # Named volume for uploads
|
||||
Loading…
Add table
Add a link
Reference in a new issue