From 7a798bf8f5f3c1de3119b4701922439637df28df Mon Sep 17 00:00:00 2001 From: Khoa Vo Date: Thu, 14 May 2026 12:17:18 +0700 Subject: [PATCH] unify: single docker-compose for Synology NAS with amd64 support --- docker-compose.local.yml | 16 ----------- docker-compose.synology.yml | 23 --------------- docker-compose.yml | 57 ++++++++++++++++++------------------- 3 files changed, 28 insertions(+), 68 deletions(-) delete mode 100644 docker-compose.local.yml delete mode 100644 docker-compose.synology.yml diff --git a/docker-compose.local.yml b/docker-compose.local.yml deleted file mode 100644 index 95ac421..0000000 --- a/docker-compose.local.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3.8' - -services: - kv-tube-app-local: - build: . - container_name: kv-tube-app-local - platform: linux/amd64 - ports: - - "5012:3000" - - "8080:8080" - volumes: - - ./data:/app/data - environment: - - KVTUBE_DATA_DIR=/app/data - - GIN_MODE=release - - NODE_ENV=production diff --git a/docker-compose.synology.yml b/docker-compose.synology.yml deleted file mode 100644 index e4f77a3..0000000 --- a/docker-compose.synology.yml +++ /dev/null @@ -1,23 +0,0 @@ -# KV-Tube Docker Compose for Synology NAS -# Usage: docker-compose up -d - -version: '3.8' - -services: - kv-tube: - image: git.khoavo.myds.me/vndangkhoa/kv-tube:v9 - container_name: kv-tube - platform: linux/amd64 - restart: unless-stopped - ports: - - "5011:3000" - - "8981:8080" - volumes: - - ./data:/app/data - environment: - - KVTUBE_DATA_DIR=/app/data - - GIN_MODE=release - - NODE_ENV=production - - CORS_ALLOWED_ORIGINS=https://ut.khoavo.myds.me,http://ut.khoavo.myds.me:5011,http://localhost:3000,http://127.0.0.1:3000 - labels: - - "com.centurylinklabs.watchtower.enable=true" diff --git a/docker-compose.yml b/docker-compose.yml index c5e0e2d..c9519a3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,53 +1,52 @@ -# KV-Tube - Self-hosted YouTube-like Video Streaming Platform -# Supports: linux/amd64 (Synology NAS, Linux servers) -# +# KV-Tube - Unified Docker Compose # Usage: docker-compose up -d # +# For Synology NAS: Uses pre-built image from Forgejo registry +# For local dev: Uncomment 'build' section to build locally +# # Access: -# - Frontend: http://localhost:5011 +# - Frontend: http://localhost:5011 (or your NAS IP) # - Backend API: http://localhost:8981 version: '3.8' services: 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: - context: . - dockerfile: Dockerfile - args: - # API URL for frontend to communicate with backend - # 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 - + # Option 1: Use pre-built image (recommended for Synology NAS) + image: git.khoavo.myds.me/vndangkhoa/kv-tube:latest + + # Option 2: Build locally (uncomment to use) + # build: + # context: . + # dockerfile: Dockerfile + container_name: kv-tube - platform: linux/amd64 # Required for Synology NAS + platform: linux/amd64 restart: unless-stopped - + ports: - "5011:3000" # Frontend (Next.js) - "8981:8080" # Backend API (Go) - + volumes: - - ./data:/app/data # Persistent data (SQLite DB, cache) - + - ./data:/app/data + environment: - KVTUBE_DATA_DIR=/app/data - GIN_MODE=release - NODE_ENV=production - # Allow all origins for development - tighten in production - - CORS_ALLOWED_ORIGINS=* - - # Enable Watchtower for auto-updates (optional) + # Update these for your domain + - FORGEJO__server__ROOT_URL=https://git.khoavo.myds.me/ + - FORGEJO__server__DOMAIN=git.khoavo.myds.me + # CORS - update to your actual domain + - CORS_ALLOWED_ORIGINS=https://ut.khoavo.myds.me,http://ut.khoavo.myds.me:5011,http://localhost:3000,http://127.0.0.1:3000,http://localhost:5011 + labels: - "com.centurylinklabs.watchtower.enable=true" -# To enable auto-updates with Watchtower, add this service: -# +# Optional: Auto-update with Watchtower +# Uncomment to enable automatic updates +# # services: # watchtower: # image: containrrr/watchtower @@ -55,4 +54,4 @@ services: # restart: unless-stopped # volumes: # - /var/run/docker.sock:/var/run/docker.sock -# command: --interval 86400 kv-tube # Check once daily \ No newline at end of file +# command: --interval 86400 kv-tube \ No newline at end of file