chore: clean up docker-compose with clear documentation
Some checks failed
Build & Push Docker Image / build (push) Failing after 0s
Some checks failed
Build & Push Docker Image / build (push) Failing after 0s
This commit is contained in:
parent
9a0ded4598
commit
f210acc05c
1 changed files with 37 additions and 7 deletions
|
|
@ -1,28 +1,58 @@
|
||||||
# KV-Tube Docker Compose for Synology NAS
|
# KV-Tube - Self-hosted YouTube-like Video Streaming Platform
|
||||||
|
# Supports: linux/amd64 (Synology NAS, Linux servers)
|
||||||
|
#
|
||||||
# Usage: docker-compose up -d
|
# Usage: docker-compose up -d
|
||||||
|
#
|
||||||
|
# Access:
|
||||||
|
# - Frontend: http://localhost:5011
|
||||||
|
# - Backend API: http://localhost:8981
|
||||||
|
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
kv-tube:
|
kv-tube:
|
||||||
|
# Build from local Dockerfile (for first-time setup or development)
|
||||||
|
# To use pre-built image, comment out 'build' and use 'image' instead
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
args:
|
||||||
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8080/api}
|
# API URL for frontend to communicate with backend
|
||||||
image: kv-tube:latest
|
# Change to your NAS IP or domain if accessing remotely
|
||||||
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8080/api}
|
||||||
|
|
||||||
|
# Uncomment below to use pre-built image instead of building:
|
||||||
|
# image: git.khoavo.myds.me/vndangkhoa/kv-tube:latest
|
||||||
|
|
||||||
container_name: kv-tube
|
container_name: kv-tube
|
||||||
platform: linux/amd64
|
platform: linux/amd64 # Required for Synology NAS
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "5011:3000"
|
- "5011:3000" # Frontend (Next.js)
|
||||||
- "8981:8080"
|
- "8981:8080" # Backend API (Go)
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/data
|
- ./data:/app/data # Persistent data (SQLite DB, cache)
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
- KVTUBE_DATA_DIR=/app/data
|
- KVTUBE_DATA_DIR=/app/data
|
||||||
- GIN_MODE=release
|
- GIN_MODE=release
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
|
# Allow all origins for development - tighten in production
|
||||||
- CORS_ALLOWED_ORIGINS=*
|
- CORS_ALLOWED_ORIGINS=*
|
||||||
|
|
||||||
|
# Enable Watchtower for auto-updates (optional)
|
||||||
labels:
|
labels:
|
||||||
- "com.centurylinklabs.watchtower.enable=true"
|
- "com.centurylinklabs.watchtower.enable=true"
|
||||||
|
|
||||||
|
# To enable auto-updates with Watchtower, add this service:
|
||||||
|
#
|
||||||
|
# services:
|
||||||
|
# watchtower:
|
||||||
|
# image: containrrr/watchtower
|
||||||
|
# container_name: watchtower
|
||||||
|
# restart: unless-stopped
|
||||||
|
# volumes:
|
||||||
|
# - /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
# command: --interval 86400 kv-tube # Check once daily
|
||||||
Loading…
Reference in a new issue