Initial Commit
This commit is contained in:
commit
e2f743e8bc
11 changed files with 3104 additions and 0 deletions
85
docker-compose.yml
Normal file
85
docker-compose.yml
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# =============================================================================
|
||||
# VideoPress — docker-compose.yml
|
||||
# =============================================================================
|
||||
#
|
||||
# Quick start:
|
||||
# 1. Edit MEDIA_HOST_PATH below (or set it as a shell variable before running)
|
||||
# 2. docker compose up -d
|
||||
# 3. Open http://localhost:8080
|
||||
#
|
||||
# All configuration lives in the 'environment' section — no .env file needed
|
||||
# for basic usage, though a .env file is supported (see comments below).
|
||||
# =============================================================================
|
||||
|
||||
services:
|
||||
videopress:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
||||
# ── Alternatively, use a pre-built image: ───────────────────────────────
|
||||
# image: videopress:latest
|
||||
|
||||
container_name: videopress
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
# ── Port mapping ─────────────────────────────────────────────────────────
|
||||
# Format: "HOST_PORT:CONTAINER_PORT"
|
||||
# The UI and REST API are served on the same port — no separate API port
|
||||
# is required. Change the host port (left side) as needed.
|
||||
ports:
|
||||
- "8080:8080"
|
||||
|
||||
# ── Volume mapping ────────────────────────────────────────────────────────
|
||||
# Map the directory on your HOST that contains the video files into the
|
||||
# container at /media (MEDIA_ROOT).
|
||||
#
|
||||
# *** Change /path/to/your/videos to the real path on your host. ***
|
||||
#
|
||||
# You can also set MEDIA_HOST_PATH as an environment variable before
|
||||
# running docker compose:
|
||||
# export MEDIA_HOST_PATH=/mnt/nas/videos && docker compose up -d
|
||||
volumes:
|
||||
- ${MEDIA_HOST_PATH:-/path/to/your/videos}:/media
|
||||
|
||||
# ── Environment variables ─────────────────────────────────────────────────
|
||||
environment:
|
||||
# Path *inside the container* where videos are accessible.
|
||||
# Must match the right-hand side of the volume mount above.
|
||||
MEDIA_ROOT: /media
|
||||
|
||||
# TCP port Gunicorn listens on (must match EXPOSE in Dockerfile and
|
||||
# the right-hand side of the ports mapping above).
|
||||
PORT: 8080
|
||||
|
||||
# Gunicorn log level: debug | info | warning | error | critical
|
||||
LOG_LEVEL: info
|
||||
|
||||
# ── Resource limits (optional — uncomment to enable) ─────────────────────
|
||||
# Compressing large video files is CPU-intensive. Limits prevent the
|
||||
# container from starving other workloads on the host.
|
||||
# deploy:
|
||||
# resources:
|
||||
# limits:
|
||||
# cpus: '4'
|
||||
# memory: 2G
|
||||
# reservations:
|
||||
# cpus: '1'
|
||||
# memory: 512M
|
||||
|
||||
# ── Health check ──────────────────────────────────────────────────────────
|
||||
healthcheck:
|
||||
test: ["CMD", "python3", "-c",
|
||||
"import urllib.request; urllib.request.urlopen('http://localhost:8080/')"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
|
||||
# ── Logging ───────────────────────────────────────────────────────────────
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
Loading…
Add table
Add a link
Reference in a new issue