18 Commits
Author SHA1 Message Date
zwitschi 47740e3f4a debug: adding debug output to workflow
CI / test (push) Successful in 1m36s
CI / docker (push) Successful in 3m4s
CI / release (push) Skipped
2026-08-04 18:04:37 +02:00
zwitschi 693b4a42f6 fix: improve CI workflows and README documentation 2026-08-04 16:58:05 +02:00
zwitschi 8f1e227d50 fix: Dockerfile parameter
CI / test (push) Successful in 1m35s
CI / docker (push) Successful in 3m12s
CI / release (push) Skipped
2026-08-04 13:44:00 +02:00
zwitschi 0891606321 fix: context
CI / test (push) Successful in 1m35s
CI / docker (push) Successful in 2m46s
CI / release (push) Skipped
2026-08-04 13:17:13 +02:00
zwitschi c6f28ff7af fix: rearrange steps again
CI / test (push) Successful in 1m35s
CI / docker (push) Failing after 30s
CI / release (push) Skipped
2026-08-04 13:00:23 +02:00
zwitschi 072a91961f fix: rearrange steps again
CI / test (push) Successful in 6m3s
CI / docker (push) Failing after 28s
CI / release (push) Skipped
2026-08-04 12:51:34 +02:00
zwitschi 7184240dd4 fix: move copy step up
CI / test (push) Successful in 1m34s
CI / docker (push) Failing after 15s
CI / release (push) Skipped
2026-08-04 12:46:47 +02:00
zwitschi 9cd0419c0c fix: only one media folder
CI / test (push) Successful in 6m5s
CI / docker (push) Failing after 1m52s
CI / release (push) Skipped
2026-08-04 12:37:11 +02:00
zwitschi d3266f8feb fix: reorder copy steps
CI / test (push) Successful in 1m36s
CI / docker (push) Failing after 29s
CI / release (push) Skipped
2026-08-04 12:33:05 +02:00
zwitschi b532507374 fix: adjust copy
CI / test (push) Successful in 1m32s
CI / docker (push) Failing after 15s
CI / release (push) Skipped
2026-08-04 12:27:44 +02:00
zwitschi 5c1a8cbe4f reorder copy steps
CI / test (push) Successful in 1m40s
CI / docker (push) Failing after 24s
CI / release (push) Skipped
2026-08-04 12:19:17 +02:00
zwitschi 502fefff33 fix: move demodata into playout build context, revert root media changes
CI / test (push) Successful in 1m30s
CI / docker (push) Failing after 30s
CI / release (push) Skipped
2026-08-04 12:10:38 +02:00
zwitschi bc3a950d99 fix: use repo root as build context for playout to include demodata
CI / test (push) Failing after 13s
CI / docker (push) Skipped
CI / release (push) Skipped
2026-08-04 12:01:03 +02:00
zwitschi 1af9e59a56 rename data directory for initial demo data
CI / test (push) Failing after 2m26s
CI / docker (push) Skipped
CI / release (push) Skipped
2026-08-04 11:54:44 +02:00
zwitschi 13d25a7ae0 remove empty line
CI / test (push) Failing after 16s
CI / docker (push) Skipped
CI / release (push) Skipped
2026-08-04 11:49:49 +02:00
zwitschi fc799da000 copy full folder instead of playlist.txt
CI / test (push) Failing after 2m25s
CI / docker (push) Skipped
CI / release (push) Skipped
2026-08-04 11:46:21 +02:00
zwitschi 2b091adce8 move demo-data to its own folder
CI / test (push) Failing after 2m24s
CI / docker (push) Skipped
CI / release (push) Skipped
2026-08-04 11:40:22 +02:00
zwitschi c54210434e feat: bundle demo media and playlist in playout image for out-of-the-box HLS
CI / test (push) Failing after 2m30s
CI / docker (push) Skipped
CI / release (push) Skipped
2026-08-04 11:34:20 +02:00
9 changed files with 156 additions and 37 deletions

No files matched your search

+1
View File
@@ -82,6 +82,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: ./backend/playout
file: ./backend/playout/Dockerfile
push: true
tags: ${{ steps.meta-playout.outputs.tags }}
labels: ${{ steps.meta-playout.outputs.labels }}
+34 -17
View File
@@ -13,7 +13,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CI_REGISTRY_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
@@ -39,20 +38,38 @@ jobs:
cd backend/playout && go get -u ./... && go mod tidy
cd ../chat && go get -u ./... && go mod tidy
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.CI_REGISTRY_TOKEN }}
commit-message: "chore: update dependencies"
title: "chore: weekly dependency updates"
body: |
Automated weekly dependency updates.
- name: Commit and push changes
run: |
git config user.name "linearvoid-bot"
git config user.email "bot@linearvoid.local"
git add frontend/package*.json backend/playout/go.* backend/chat/go.*
if git diff --cached --quiet; then
echo "No dependency changes detected."
exit 0
fi
git commit -m "chore: update dependencies"
git push origin HEAD:dependency-updates --force
This PR updates:
- Frontend npm dependencies
- Go module dependencies
Please review the changes and ensure tests pass before merging.
branch: dependency-updates
delete-branch: true
labels: dependencies, automated
- name: Create Pull Request via Gitea API
run: |
RESPONSE=$(curl -s -o /tmp/pr-response.json -w "%{http_code}" \
-X POST "$CI_SERVER_URL/api/v1/repos/zwitschi/linearvoid/pulls" \
-H "Authorization: token ${{ secrets.CI_REGISTRY_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{
"title": "chore: weekly dependency updates",
"head": "dependency-updates",
"base": "main",
"body": "Automated weekly dependency updates.\n\nThis PR updates:\n- Frontend npm dependencies\n- Go module dependencies\n\nPlease review the changes and ensure tests pass before merging."
}')
if [ "$RESPONSE" -eq 201 ]; then
PR_URL=$(cat /tmp/pr-response.json | jq -r '.html_url')
echo "PR created: $PR_URL"
elif [ "$RESPONSE" -eq 409 ]; then
echo "PR already exists. Pushing updated commits..."
git push origin dependency-updates --force
else
echo "Error creating PR (HTTP $RESPONSE):"
cat /tmp/pr-response.json
exit 1
fi
+24 -10
View File
@@ -34,10 +34,25 @@ jobs:
id: version
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
VERSION="${{ github.event.inputs.version }}"
else
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
VERSION="${GITHUB_REF#refs/tags/}"
fi
if [[ -z "$VERSION" ]]; then
echo "::error::VERSION is empty. Provide a version via workflow_dispatch input or push a tag."
exit 1
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Releasing version: $VERSION"
- name: Print version to gitea runner log
run: |
echo "Releasing version: ${{ steps.version.outputs.version }}"
echo "===DEBUG==="
echo "VERSION: $VERSION"
echo "GITHUB_REF: $GITHUB_REF"
echo "steps.version.outputs.version: ${{ steps.version.outputs.version }}"
echo "github.event_name: ${{ github.event_name }}"
- name: Extract metadata for Playout
id: meta-playout
@@ -89,15 +104,14 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
dockerfile: infrastructure/nginx/Dockerfile
file: infrastructure/nginx/Dockerfile
push: true
tags: ${{ steps.meta-nginx.outputs.tags }}
labels: ${{ steps.meta-nginx.outputs.labels }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
tag_name: ${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.CI_REGISTRY_TOKEN }}
- name: Create Release on Gitea
run: |
curl -X POST "https://git.allucanget.biz/api/v1/repos/zwitschi/linearvoid/releases" \
-H "Authorization: token ${{ secrets.CI_REGISTRY_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${{ steps.version.outputs.version }}\",\"name\":\"${{ steps.version.outputs.version }}\",\"body\":\"Release ${{ steps.version.outputs.version }}\n\nSee [CHANGELOG.md](https://git.allucanget.biz/zwitschi/linearvoid/src/branch/main/CHANGELOG.md) for details.\",\"draft\":false,\"prerelease\":false}"
+3
View File
@@ -50,6 +50,9 @@ data/
*.sqlite
*.sqlite3
# Demo data (tracked in backend/playout/demodata/ for out-of-the-box playout)
!backend/playout/demodata/
# Docker
.dockerignore
**/.dockerignore
+83
View File
@@ -7,6 +7,8 @@
[![Build Status](https://git.allucanget.biz/zwitschi/linearvoid/actions/workflows/ci.yml/badge.svg)](https://git.allucanget.biz/zwitschi/linearvoid/actions)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Gitea](https://img.shields.io/badge/Gitea-1.27.1-blue)](https://git.allucanget.biz)
[![Version](https://img.shields.io/badge/version-1.0.3-blue)](https://git.allucanget.biz/zwitschi/linearvoid/releases)
[![Release Notes](https://img.shields.io/badge/release-notes-green)](CHANGELOG.md)
## Architecture
@@ -27,6 +29,23 @@ See [`docs/architecture/adr/`](docs/architecture/adr/) for the full set of decis
- Video normalization, monitoring, fallback slate, and easy playlist management.
- US-centric performance (Ashburn origin + Cloudflare POPs).
## Architecture Diagram
```mermaid
flowchart TD
V[US Viewers] -->|HTTPS| CF[Cloudflare CDN]
CF -->|Cache HIT| R2[Cloudflare R2]
CF -->|Cache MISS| N[Nginx :80]
N -->|/ws| CH[Chat :3000]
N -->|/admin| CH
N -->|/hls| P[Playout :8081]
N -->|/*| FE[Frontend SPA]
CH --> R[(Redis)]
CH --> DB[(PostgreSQL)]
P -->|ffmpeg| HLS[/data/hls/]
P -->|sync| R2
```
## Project Structure
```text
@@ -97,9 +116,16 @@ This structure directly reflects the building blocks, runtime flows, deployment
git clone https://git.allucanget.biz/zwitschi/linearvoid.git
cd linearvoid
cp .env.example .env
# Edit .env with your R2 credentials and domain settings
docker compose up --build
```
Then open:
- **Viewer**: [https://linearvoid.tv](https://linearvoid.tv) (or `http://localhost`)
- **Admin**: [https://linearvoid.tv/admin](https://linearvoid.tv/admin) (or `http://localhost/admin`)
- **Metrics**: [https://linearvoid.tv/metrics](https://linearvoid.tv/metrics)
Full setup guide: [`SETUP.md`](SETUP.md).
See the [architecture docs](docs/architecture/README.md) for detailed architecture and ADRs.
@@ -111,6 +137,50 @@ See the [architecture docs](docs/architecture/README.md) for detailed architectu
- Normalize all source videos before adding to playlist (see ADR-001 for exact codec/fps/keyframe requirements).
- Monitor cache hit ratio and R2 operations closely — they determine real cost.
### Environment Variables
| Variable | Default | Description |
| ---------------------- | ----------------------------------------------- | -------------------------------- |
| `R2_ACCESS_KEY_ID` | — | Cloudflare R2 access key |
| `R2_SECRET_ACCESS_KEY` | — | Cloudflare R2 secret key |
| `R2_BUCKET_NAME` | `linearvoid-media` | R2 bucket for HLS segments |
| `DATABASE_URL` | `postgres://...@db:5432/...` | Chat DB (Postgres or SQLite) |
| `REDIS_URL` | `redis://redis:6379/0` | Redis for presence/rate limiting |
| `VITE_PUBLIC_APP_URL` | `https://linearvoid.tv` | Public viewer URL |
| `VITE_PUBLIC_WS_URL` | `wss://linearvoid.tv/ws` | WebSocket endpoint |
| `VITE_PUBLIC_HLS_URL` | `https://media.linearvoid.tv/hls/playlist.m3u8` | HLS playlist URL |
| `ADMIN_USERNAME` | `admin` | Admin panel username |
| `ADMIN_PASSWORD` | — | Admin panel password |
| `HLS_SEGMENT_DURATION` | `6` | HLS segment duration in seconds |
| `HLS_WINDOW_SIZE` | `24` | HLS playlist window size |
Full reference: [`.env.example`](.env.example).
### Troubleshooting
| Problem | Check |
| ------------------------ | ------------------------------------------------------------------------------------- |
| **Playout not starting** | Verify playlist exists in `data/playlist/playlist.txt` and media files are accessible |
| **HLS not playing** | Check `docker compose logs playout` for ffmpeg errors; verify `data/hls/` permissions |
| **Chat not connecting** | Ensure Redis is running: `docker compose logs redis`; check `DATABASE_URL` |
| **Admin panel 401** | Verify `ADMIN_USERNAME`/`ADMIN_PASSWORD` in `.env` match login credentials |
| **Docker build fails** | Run `docker compose build --no-cache`; check `backend/playout/.dockerignore` |
| **R2 upload failures** | Verify `R2_ACCESS_KEY_ID` and `R2_SECRET_ACCESS_KEY`; check bucket CORS settings |
### API Endpoints
| Service | Endpoint | Description |
| ----------- | ------------------------ | -------------------------- |
| **Chat** | `GET /health` | Health check |
| **Chat** | `GET /metrics` | Prometheus metrics |
| **Chat** | `GET /ws` | WebSocket upgrade for chat |
| **Chat** | `GET /api/admin/*` | Admin API (auth required) |
| **Chat** | `POST /api/admin/login` | Admin login |
| **Playout** | `GET /health` | Health check (port 8081) |
| **Nginx** | `GET /` | Viewer SPA |
| **Nginx** | `GET /admin/` | Admin panel |
| **Nginx** | `GET /hls/playlist.m3u8` | HLS manifest |
## Architecture Documentation
The architecture is fully documented using the [arc42 template](docs/architecture/README.md) (with populated sections, Mermaid context and building-block diagrams, deployment view, cross-cutting concepts, quality goals, risks, and glossary).
@@ -141,4 +211,17 @@ Contributions, issues, and further evolution (LL-HLS, ABR, multi-channel, E2EE)
**Container Registry**: `git.allucanget.biz/zwitschi/linearvoid/<service>:latest`
## Contributing
Contributions are welcome! See [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines. Quick overview:
1. Read the [architecture docs](docs/architecture/README.md) and ADRs first.
2. Plan tasks in `.github/instructions/TODO.md`.
3. Open PRs on [Gitea](https://git.allucanget.biz/zwitschi/linearvoid).
4. CI validates builds and tests automatically.
Since this a linear project, we also rely on a linear development and release model: Only main branch is used for releases, and all features are merged into main after review and CI validation. Releases are tagged with semantic versioning (v1.0.3, v1.0.4, etc.) and automatically built/pushed to the container registry.
[MIT License](LICENSE)
The project is ready for use. See [`SETUP.md`](SETUP.md) for detailed installation instructions.
+8 -10
View File
@@ -16,20 +16,18 @@ RUN apk add --no-cache \
ffmpeg \
curl \
bash
# Set working directory for playout
WORKDIR /app
COPY --from=builder /playlist-manager /app/playlist-manager
# Copy the playout start script and the built playlist manager binary
COPY start-playout.sh /app/
COPY *.sh /app/
RUN chmod +x /app/*.sh /app/playlist-manager
# Copy demo data for out-of-the-box playout
COPY demodata/ /app/
# Copy the built playlist manager binary from the builder stage
COPY --from=builder /playlist-manager /app/playlist-manager
# Create directories for playlist, media, and HLS output
RUN mkdir -p /app/playlist /app/media /app/hls
RUN mkdir -p /app/hls
RUN chmod +x /app/start-playout.sh /app/playlist-manager
# Expose HLS directory (will be served by nginx)
VOLUME ["/app/hls"]
# Default command runs the playout loop (which calls the Go validator)
CMD ["./start-playout.sh"]
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
# Linear Void Demo Playlist
file '/app/media/demo1.mp4'
file '/app/media/demo2.mp4'