remove xemle/home-gallery
This commit is contained in:
parent
d7dcbb2d8c
commit
345935b7bb
6 changed files with 3 additions and 234 deletions
|
@ -9,12 +9,9 @@ Multi channel stream setup with Flask REST API for scheduling channels.
|
|||
|
||||
### Usage
|
||||
1. Access the admin panel at `https://stream.example.com/ui`
|
||||
2. Access the recordings gallery at `https://vod.example.com/`
|
||||
2. Access the recordings gallery at `https://tv.example.com/gallery`
|
||||
|
||||
### EPG stream priorities
|
||||
- prio = 0 - scheduled
|
||||
- prio = 1 - live
|
||||
- prio = 2 - live and vod recording
|
||||
|
||||
### Purge vod database
|
||||
`docker exec -ti television_archive_1 /app/gallery.js storage --storage /data/storage --database /data/config/database.db -l debug purge`
|
|
@ -1,176 +0,0 @@
|
|||
#
|
||||
# HomeGallery configuration file
|
||||
#
|
||||
#
|
||||
# Default configuration file is gallery.config.yml. JSON format is
|
||||
# also supported (gallery.config.json)
|
||||
#
|
||||
# This is a comment, starting with hash tag and space ('# ')
|
||||
# A default value starting with hash tag and variable ('#baseDir...')
|
||||
#
|
||||
# Directory value examples:
|
||||
# - /absolute/directory
|
||||
# - relative/directory/to/current/working/dir
|
||||
# - ~/directory/in/your/home
|
||||
# - ./relative/directory/to/configuration/file
|
||||
#
|
||||
# Variable replacements
|
||||
# baseDir: '~'
|
||||
# configDir: '{baseDir}/.config/home-gallery'
|
||||
# configDir is replaced to '~/.config/home-gallery' and than to '$HOME/.config/home-gallery'
|
||||
#
|
||||
# Variables are overwritten by environment variables
|
||||
#
|
||||
# Variables are baseDir, configDir, configPrefix, cacheDir and dir in sources
|
||||
# or environment variables GALLERY_BASE_DIR, GALLERY_CONFIG_DIR, GALLERY_CONFIG_PREFIX, GALLERY_CACHE_DIR
|
||||
|
||||
#
|
||||
# General
|
||||
#
|
||||
#baseDir: '~'
|
||||
#configDir: '{baseDir}/.config/home-gallery'
|
||||
# file prefix for index, database and events
|
||||
#configPrefix: ''
|
||||
#cacheDir: '{baseDir}/.cache/home-gallery'
|
||||
|
||||
#
|
||||
# Sources
|
||||
#
|
||||
# List of media source directories. These can be read only.
|
||||
#
|
||||
# All sources are used to build the gallery database. If you need
|
||||
# different databases or gallery instances use different gallery
|
||||
# configurations
|
||||
sources:
|
||||
- dir: '{baseDir}/vod'
|
||||
#index: '{configDir}/{configPrefix}{basename(dir)}.idx'
|
||||
# excludes are using gitignore patterns
|
||||
#excludes:
|
||||
#- .DS_Store
|
||||
#- ._*
|
||||
#- '*.tmp'
|
||||
#- '*cache*'
|
||||
#excludeIfPresent: .galleryignore
|
||||
# excludeFromFile: '{configDir}/excludes'
|
||||
# Use maxFilesize to exclude big files such as videos to speedup initial setup
|
||||
# maxFilesize: 20M
|
||||
# If source directory/disk is offline/unmounted set it to true.
|
||||
# Offline sources require an index file. Previews and meta data
|
||||
# should be extracted first before marking a source offline
|
||||
#offline: false
|
||||
# Filename matcher for checksum recalculation
|
||||
# size-ctime-inode: this matcher should be used if possible, might
|
||||
# not work on windows
|
||||
# size-ctime: this matcher should be used if stable fs inodes are
|
||||
# not available and might not work for fuse shares
|
||||
# size: this matcher should be used if you know what you are doing
|
||||
#matcher: size-ctime-inode
|
||||
|
||||
#
|
||||
# Extractor settings
|
||||
#
|
||||
extractor:
|
||||
# Preview image settings
|
||||
#image:
|
||||
# previewSizes: [1920, 1280, 800, 320, 128]
|
||||
# previewQuality: 80
|
||||
video:
|
||||
previewSize: 1080 # used as preview size and preview filename
|
||||
ext: mp4 # used as target video container and preview filename
|
||||
#scale: -2:'min(720,ih)' # overwrites previewSize. E.g. -2:'min(ih,max(720,min(1080,ih*.5)))' for 720p <= height*0.5 <= 1080p or height, if height < 720
|
||||
frameRate: 30
|
||||
maxVideoBitRate: 5000 # in KB
|
||||
videoEncoder: libx264
|
||||
preset: veryfast
|
||||
profile: high
|
||||
level: '3.0'
|
||||
#addFfmpegArgs: [...] # Additional ffmpeg args
|
||||
#customFfmpegArgs: [...] # custom ffmpeg args for video conversion, replaces all other settings such previewSize, videoEncoder, addFfmpegArgs, ...
|
||||
# Api Server is used for image similarity, object and face detection
|
||||
#apiServer:
|
||||
# url: https://api.home-gallery.org
|
||||
# timeout: 30
|
||||
# concurrent: 5
|
||||
# disable:
|
||||
# - similarDetection
|
||||
# - objectDetection
|
||||
# - faceDetection
|
||||
#geoReverse:
|
||||
# url: https://nominatim.openstreetmap.org
|
||||
# Preffered address language of geo code reverse lookups
|
||||
# addressLanguage: [de, en-US] # for multiple languages
|
||||
# addressLanguage: [en, de]
|
||||
# excludes are using gitignore patterns
|
||||
#excludes: []
|
||||
# Use native system commands. It is recoomended on armv6 and arm7 platform
|
||||
# since the npm packages do not provide binaries for these platforms
|
||||
#useNative:
|
||||
# - vipsthumbnail # use libvips to resize images
|
||||
# - convert # use ImageMagick to resize images
|
||||
# - ffprobe
|
||||
# - ffmpeg
|
||||
|
||||
#
|
||||
# Storage and files configuration
|
||||
#
|
||||
#storage:
|
||||
#dir: '{cacheDir}/storage'
|
||||
#database:
|
||||
#file: '{configDir}/{configPrefix}database.db'
|
||||
# The full database creation is memory consuming. The default value is 2048 MB.
|
||||
# On memory errors or for larger photo collections (>50000 images) 4096 MB is recommended
|
||||
# Use less memory for smaller devices (e.g. Raspberry Pi Zero), e.g. 512 MB.
|
||||
# Node's default memory limit is 512 MB (changeable via --max-old-space-size node arg)
|
||||
#maxMemory: 2048
|
||||
#events:
|
||||
#file: '{configDir}/{configPrefix}events.db'
|
||||
|
||||
#
|
||||
# Server configuration
|
||||
#
|
||||
#server:
|
||||
#port: 3000
|
||||
#host: '0.0.0.0'
|
||||
# security configuration for https
|
||||
# key: '{configDir}/server.key'
|
||||
# cert: '{configDir}/server.crt'
|
||||
# Open browser when server starts
|
||||
#openBrowser: true
|
||||
# Enable basic authentication users and ip whitelist rules which require no authentication
|
||||
# First matching rule wins. Default rules are: allow: localhost and deny: all.
|
||||
# Hashed password can be generated via
|
||||
# node -e "pw=process.argv[1]||'';sha1=require('crypto').createHash('sha1').update(pw).digest('base64');console.log('{SHA}'+sha1)" password
|
||||
# {SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=
|
||||
# auth:
|
||||
# users:
|
||||
# - username: password
|
||||
# - username: '{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g='
|
||||
# rules:
|
||||
# - allow: localhost
|
||||
# - allow: '192.168/16'
|
||||
# - deny: all
|
||||
#basePath: /
|
||||
#watchSources: true
|
||||
|
||||
#
|
||||
# Webapp configuration
|
||||
#
|
||||
#webapp:
|
||||
# Disabled webapp features
|
||||
#disabled:
|
||||
#- edit
|
||||
#- serverEvents
|
||||
#- pwa
|
||||
#- offlineDatabase
|
||||
|
||||
logger:
|
||||
# Currently console and file loggers are available
|
||||
- type: console
|
||||
# Log level could be one of trace, debug, info, warn, error, fatal, silent
|
||||
level: warn
|
||||
# format: json
|
||||
# File logger format is in newline delimited JSON. See http://ndjson.org
|
||||
- type: file
|
||||
# Log level could be one of trace, debug, info, warn, error, fatal, silent
|
||||
level: debug
|
||||
file: '{configDir}/{configPrefix}gallery.log'
|
|
@ -64,12 +64,10 @@ frontend https
|
|||
# ACL to match the sni hosts
|
||||
acl is_stream ssl_fc_sni -i "stream.${BASE_URL}"
|
||||
acl is_tv ssl_fc_sni -i "tv.${BASE_URL}"
|
||||
acl is_vod ssl_fc_sni -i "vod.${BASE_URL}"
|
||||
|
||||
# Define the ACL conditions and corresponding actions
|
||||
use_backend backend_restreamer if is_stream
|
||||
use_backend backend_scheduler if is_tv
|
||||
use_backend backend_archive if is_vod
|
||||
|
||||
backend backend_restreamer
|
||||
balance leastconn
|
||||
|
@ -78,7 +76,3 @@ backend backend_restreamer
|
|||
backend backend_scheduler
|
||||
balance leastconn
|
||||
server scheduler1 scheduler:8080 check inter 5s rise 4 fall 2
|
||||
|
||||
backend backend_archive
|
||||
balance leastconn
|
||||
server archive1 archive:3000 check inter 5s rise 4 fall 2
|
||||
|
|
|
@ -38,7 +38,6 @@ services:
|
|||
- net
|
||||
labels:
|
||||
- meta.role=certbot
|
||||
#entrypoint: sh -c 'while true; do sleep 1; done'
|
||||
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 15d & wait $${!}; done;'"
|
||||
|
||||
restreamer:
|
||||
|
@ -83,47 +82,4 @@ services:
|
|||
networks:
|
||||
- net
|
||||
labels:
|
||||
- meta.role=discordbot
|
||||
|
||||
archive-api:
|
||||
depends_on:
|
||||
- "scheduler"
|
||||
image: xemle/home-gallery-api-server
|
||||
environment:
|
||||
# TensorflowJS backends
|
||||
# - cpu: slowest and best support
|
||||
# - wasm: good perfromance for arm64 and amd64 platforms
|
||||
# - node: best performance on amd64 platform
|
||||
#- BACKEND=cpu
|
||||
- BACKEND=wasm
|
||||
#- BACKEND=node
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- net
|
||||
labels:
|
||||
- meta.role=archive-api
|
||||
|
||||
archive:
|
||||
depends_on:
|
||||
- "scheduler"
|
||||
image: xemle/home-gallery:1.14.6
|
||||
environment:
|
||||
- GALLERY_API_SERVER=http://archive-api:3000
|
||||
- GALLERY_API_SERVER_CONCURRENT=5 # for SoC devices like Rasperry Pi. Use 5 otherwise
|
||||
- GALLERY_API_SERVER_TIMEOUT=30 # for SoC devices like Rasperry Pi. Use 30 otherwise
|
||||
#- GALLERY_USE_NATIVE=ffprobe,ffmpeg,vipsthumbnail # On issues with sharp resizer
|
||||
- GALLERY_OPEN_BROWSER=false
|
||||
# Use polling for safety of possible network mounts. Try 0 to use inotify via fs.watch
|
||||
- GALLERY_WATCH_POLL_INTERVAL=300
|
||||
volumes:
|
||||
- "./config/archive/gallery.config.yml:/data/config/gallery.config.yml"
|
||||
- "./data/archive:/data"
|
||||
- "./data/recorder/vod:/data/vod:ro"
|
||||
#user: "${CURRENT_USER}"
|
||||
entrypoint: ['node', '/app/gallery.js']
|
||||
command: ['run', 'server']
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- net
|
||||
labels:
|
||||
- meta.role=archive
|
||||
- meta.role=discordbot
|
2
init.sh
2
init.sh
|
@ -8,8 +8,6 @@ mkdir -v -p data/recorder/vod
|
|||
mkdir -v -p data/recorder/live
|
||||
mkdir -v -p data/recorder/thumb
|
||||
|
||||
mkdir -v -p data/archive
|
||||
|
||||
mkdir -v -p data/certbot/etc
|
||||
mkdir -v -p data/certbot/var
|
||||
mkdir -v -p logs/certbot
|
||||
|
|
|
@ -8,7 +8,7 @@ CB=`docker ps | grep certbot | cut -d ' ' -f 1`
|
|||
#echo $EMAIL
|
||||
|
||||
docker exec $CB certbot certonly --non-interactive --standalone --http-01-address 0.0.0.0 --email $EMAIL --agree-tos --keep --preferred-challenges http --cert-name stream.$BASE_URL \
|
||||
-d tv.$BASE_URL -d stream.$BASE_URL -d vod.$BASE_URL
|
||||
-d tv.$BASE_URL -d stream.$BASE_URL
|
||||
|
||||
cat "./data/certbot/etc/live/stream.$BASE_URL/privkey.pem" "./data/certbot/etc/live/stream.$BASE_URL/fullchain.pem" > "./data/certificates/stream.$BASE_URL.pem"
|
||||
docker kill -s USR2 television_haproxy_1
|
||||
|
|
Loading…
Reference in a new issue